|
| 1 | +#=======================================================================# |
| 2 | +# Default Web Domain Template # |
| 3 | +# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS # |
| 4 | +#=======================================================================# |
| 5 | + |
| 6 | +server { |
| 7 | + listen %ip%:%web_ssl_port% ssl http2; |
| 8 | + server_name %domain_idn% %alias_idn%; |
| 9 | + root %sdocroot%; |
| 10 | + index index.php index.html index.htm; |
| 11 | + access_log /var/log/nginx/domains/%domain%.log combined; |
| 12 | + access_log /var/log/nginx/domains/%domain%.bytes bytes; |
| 13 | + error_log /var/log/nginx/domains/%domain%.error.log error; |
| 14 | + |
| 15 | + ssl_certificate %ssl_pem%; |
| 16 | + ssl_certificate_key %ssl_key%; |
| 17 | + ssl_stapling on; |
| 18 | + ssl_stapling_verify on; |
| 19 | + |
| 20 | + include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*; |
| 21 | + |
| 22 | + location / { |
| 23 | + |
| 24 | + location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ { |
| 25 | + expires max; |
| 26 | + fastcgi_hide_header "Set-Cookie"; |
| 27 | + } |
| 28 | + |
| 29 | + location ~ [^/]\.php(/|$) { |
| 30 | + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; |
| 31 | + if (!-f $document_root$fastcgi_script_name) { |
| 32 | + return 404; |
| 33 | + } |
| 34 | + |
| 35 | + fastcgi_pass %backend_lsnr%; |
| 36 | + fastcgi_index index.php; |
| 37 | + include /etc/nginx/fastcgi_params; |
| 38 | + |
| 39 | + fastcgi_cache %domain%; |
| 40 | + fastcgi_no_cache $no_cache; |
| 41 | + fastcgi_cache_bypass $no_cache; |
| 42 | + fastcgi_cache_bypass $cookie_session $http_x_update; |
| 43 | + } |
| 44 | + } |
| 45 | + |
| 46 | + location /error/ { |
| 47 | + alias %home%/%user%/web/%domain%/document_errors/; |
| 48 | + } |
| 49 | + |
| 50 | + location ~* "/\.(htaccess|htpasswd)$" { |
| 51 | + deny all; |
| 52 | + return 404; |
| 53 | + } |
| 54 | + |
| 55 | + location /vstats/ { |
| 56 | + alias %home%/%user%/web/%domain%/stats/; |
| 57 | + include %home%/%user%/web/%domain%/stats/auth.conf*; |
| 58 | + } |
| 59 | + |
| 60 | + include /etc/nginx/conf.d/phpmyadmin.inc*; |
| 61 | + include /etc/nginx/conf.d/phppgadmin.inc*; |
| 62 | + include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*; |
| 63 | +} |
0 commit comments