rainloop.tpl 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. server {
  2. listen %ip%:%web_port%;
  3. server_name %domain% %alias%;
  4. root /var/lib/rainloop;
  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. try_files $uri $uri/ =404;
  19. location ~* ^.+\.(ogg|ogv|svg|svgz|swf|eot|otf|woff|woff2|mov|mp3|mp4|webm|flv|ttf|rss|atom|jpg|jpeg|gif|png|ico|bmp|mid|midi|wav|rtf|css|js|jar)$ {
  20. expires 7d;
  21. fastcgi_hide_header "Set-Cookie";
  22. }
  23. location ~ ^/(.*\.php)$ {
  24. alias /var/lib/rainloop/$1;
  25. fastcgi_pass 127.0.0.1:9000;
  26. fastcgi_index index.php;
  27. include fastcgi_params;
  28. fastcgi_param SCRIPT_FILENAME $request_filename;
  29. }
  30. }
  31. location /error/ {
  32. alias /var/www/document_errors/;
  33. }
  34. include %home%/%user%/conf/mail/%root_domain%/%web_system%.conf_*;
  35. }