default.tpl 1.2 KB

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