web_system.stpl 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. server {
  2. listen %ip%:%web_ssl_port% ssl http2;
  3. server_name %domain_idn% %alias_idn%;
  4. root /var/lib/roundcube;
  5. index index.php index.html index.htm;
  6. access_log /var/log/nginx/domains/%domain%.log combined;
  7. error_log /var/log/nginx/domains/%domain%.error.log error;
  8. ssl_certificate %ssl_pem%;
  9. ssl_certificate_key %ssl_key%;
  10. ssl_stapling on;
  11. ssl_stapling_verify on;
  12. location ~ /\.(?!well-known\/) {
  13. deny all;
  14. return 404;
  15. }
  16. location ~ ^/(README.md|config|temp|logs|bin|SQL|INSTALL|LICENSE|CHANGELOG|UPGRADING)$ {
  17. deny all;
  18. return 404;
  19. }
  20. location / {
  21. try_files $uri $uri/ =404;
  22. 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)$ {
  23. expires 7d;
  24. fastcgi_hide_header "Set-Cookie";
  25. }
  26. location ~ ^/(.*\.php)$ {
  27. fastcgi_pass 127.0.0.1:9000;
  28. fastcgi_index index.php;
  29. include fastcgi_params;
  30. fastcgi_param SCRIPT_FILENAME $request_filename;
  31. }
  32. }
  33. location /error/ {
  34. alias /var/www/document_errors/;
  35. }
  36. proxy_hide_header Upgrade;
  37. include %home%/%user%/conf/mail/%root_domain%/%web_system%.ssl.conf_*;
  38. }