default.tpl 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. server {
  2. listen %ip%:%proxy_port%;
  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. include %home%/%user%/conf/mail/%root_domain%/nginx.forcessl.conf*;
  9. location ~ /\.(?!well-known\/) {
  10. deny all;
  11. return 404;
  12. }
  13. location ~ ^/(README.md|config|temp|logs|bin|SQL|INSTALL|LICENSE|CHANGELOG|UPGRADING)$ {
  14. deny all;
  15. return 404;
  16. }
  17. location / {
  18. alias /var/lib/roundcube/;
  19. try_files $uri $uri/ =404;
  20. proxy_pass http://%ip%:%web_port%;
  21. 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)$ {
  22. expires 7d;
  23. fastcgi_hide_header "Set-Cookie";
  24. }
  25. }
  26. location @fallback {
  27. proxy_pass http://%ip%:%web_port%;
  28. }
  29. location /error/ {
  30. alias /var/www/document_errors/;
  31. }
  32. include %home%/%user%/conf/mail/%root_domain%/%proxy_system%.conf_*;
  33. }