web_system.stpl 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. server {
  2. %<i4 listen %web_ipv4%:%web_ssl_port% ssl http2;i4>%
  3. %<i6 listen %web_ipv6%:%web_ssl_port% ssl http2;i6>%
  4. server_name %domain_idn% %alias_idn%;
  5. root /var/lib/roundcube;
  6. index index.php index.html index.htm;
  7. access_log /var/log/nginx/domains/%domain%.log combined;
  8. error_log /var/log/nginx/domains/%domain%.error.log error;
  9. ssl_certificate %ssl_pem%;
  10. ssl_certificate_key %ssl_key%;
  11. ssl_stapling on;
  12. ssl_stapling_verify on;
  13. location ~ /\.(?!well-known\/) {
  14. deny all;
  15. return 404;
  16. }
  17. location ~ ^/(README.md|config|temp|logs|bin|SQL|INSTALL|LICENSE|CHANGELOG|UPGRADING)$ {
  18. deny all;
  19. return 404;
  20. }
  21. location / {
  22. try_files $uri $uri/ =404;
  23. location ~* ^.+\.(ogg|ogv|svg|svgz|swf|eot|otf|woff|woff2|mov|mp3|mp4|webm|flv|ttf|rss|atom|jpg|jpeg|gif|png|webp|ico|bmp|mid|midi|wav|rtf|css|js|jar)$ {
  24. expires 7d;
  25. fastcgi_hide_header "Set-Cookie";
  26. }
  27. location ~ ^/(.*\.php)$ {
  28. fastcgi_pass 127.0.0.1:9000;
  29. fastcgi_index index.php;
  30. include fastcgi_params;
  31. fastcgi_param SCRIPT_FILENAME $request_filename;
  32. }
  33. }
  34. location /error/ {
  35. alias /var/www/document_errors/;
  36. }
  37. proxy_hide_header Upgrade;
  38. include %home%/%user%/conf/mail/%root_domain%/%web_system%.ssl.conf_*;
  39. }