rainloop.tpl 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. server {
  2. listen %ip%:%web_port%;
  3. server_name %domain_idn% %alias_idn%;
  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 ^~ /data {
  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|ico|bmp|mid|midi|wav|rtf|css|js|jar)$ {
  24. expires 7d;
  25. fastcgi_hide_header "Set-Cookie";
  26. }
  27. location ~ ^/(.*\.php)$ {
  28. alias /var/lib/rainloop/$1;
  29. fastcgi_pass 127.0.0.1:9000;
  30. fastcgi_index index.php;
  31. include fastcgi_params;
  32. fastcgi_param SCRIPT_FILENAME $request_filename;
  33. }
  34. }
  35. location /error/ {
  36. alias /var/www/document_errors/;
  37. }
  38. include %home%/%user%/conf/mail/%root_domain%/%web_system%.conf_*;
  39. }