|
| 1 | +server { |
| 2 | + listen %ip%:%web_ssl_port%; |
| 3 | + server_name %domain_idn% %alias_idn%; |
| 4 | + root %sdocroot%; |
| 5 | + index index.php index.html index.htm; |
| 6 | + access_log /var/log/nginx/domains/%domain%.log combined; |
| 7 | + access_log /var/log/nginx/domains/%domain%.bytes bytes; |
| 8 | + error_log /var/log/nginx/domains/%domain%.error.log error; |
| 9 | + |
| 10 | + ssl on; |
| 11 | + ssl_certificate %ssl_pem%; |
| 12 | + ssl_certificate_key %ssl_key%; |
| 13 | + |
| 14 | + proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504; |
| 15 | + proxy_redirect off; |
| 16 | + |
| 17 | + proxy_set_header X-Forwarded-Host $host; |
| 18 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
| 19 | + proxy_set_header X-Forwarded-Proto $scheme; |
| 20 | + proxy_set_header X-Real-IP $remote_addr; |
| 21 | + |
| 22 | + proxy_connect_timeout 720; |
| 23 | + proxy_send_timeout 720; |
| 24 | + proxy_read_timeout 720; |
| 25 | + send_timeout 720; |
| 26 | + |
| 27 | + # Allow "Well-Known URIs" as per RFC 5785 |
| 28 | + location ~* ^/.well-known/ { |
| 29 | + allow all; |
| 30 | + } |
| 31 | + |
| 32 | + location / { |
| 33 | + proxy_pass http://127.0.0.1:8069; |
| 34 | + } |
| 35 | + |
| 36 | + location /longpolling { |
| 37 | + proxy_pass http://127.0.0.1:8072; |
| 38 | + } |
| 39 | + |
| 40 | + location ~* /web/static/ { |
| 41 | + proxy_cache_valid 200 60m; |
| 42 | + proxy_buffering on; |
| 43 | + expires 864000; |
| 44 | + proxy_pass http://127.0.0.1:8069; |
| 45 | + } |
| 46 | + |
| 47 | + error_page 403 /error/404.html; |
| 48 | + error_page 404 /error/404.html; |
| 49 | + error_page 500 502 503 504 /error/50x.html; |
| 50 | + |
| 51 | + location /error/ { |
| 52 | + alias %home%/%user%/web/%domain%/document_errors/; |
| 53 | + } |
| 54 | + |
| 55 | + location ~* "/\.(htaccess|htpasswd)$" { |
| 56 | + deny all; |
| 57 | + return 404; |
| 58 | + } |
| 59 | + |
| 60 | + location /vstats/ { |
| 61 | + alias %home%/%user%/web/%domain%/stats/; |
| 62 | + include %home%/%user%/web/%domain%/stats/auth.conf*; |
| 63 | + } |
| 64 | + |
| 65 | + include /etc/nginx/conf.d/phpmyadmin.inc*; |
| 66 | + include /etc/nginx/conf.d/phppgadmin.inc*; |
| 67 | + include /etc/nginx/conf.d/webmail.inc*; |
| 68 | + |
| 69 | + include %home%/%user%/conf/web/snginx.%domain_idn%.conf*; |
| 70 | +} |
0 commit comments