odoo.stpl 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. server {
  2. listen %ip%:%web_ssl_port% ssl;
  3. server_name %domain_idn% %alias_idn%;
  4. root %sdocroot%;
  5. index index.php index.html index.htm;
  6. access_log /var/log/nginx/domains/%domain%.log combined;
  7. access_log /var/log/nginx/domains/%domain%.bytes bytes;
  8. error_log /var/log/nginx/domains/%domain%.error.log error;
  9. ssl_certificate %ssl_pem%;
  10. ssl_certificate_key %ssl_key%;
  11. proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
  12. proxy_redirect off;
  13. proxy_set_header X-Forwarded-Host $host;
  14. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  15. proxy_set_header X-Forwarded-Proto $scheme;
  16. proxy_set_header X-Real-IP $remote_addr;
  17. proxy_connect_timeout 720;
  18. proxy_send_timeout 720;
  19. proxy_read_timeout 720;
  20. send_timeout 720;
  21. # Allow "Well-Known URIs" as per RFC 5785
  22. location ~* ^/.well-known/ {
  23. allow all;
  24. }
  25. location / {
  26. proxy_pass http://127.0.0.1:8069;
  27. }
  28. location /longpolling {
  29. proxy_pass http://127.0.0.1:8072;
  30. }
  31. location ~* /web/static/ {
  32. proxy_cache_valid 200 60m;
  33. proxy_buffering on;
  34. expires 864000;
  35. proxy_pass http://127.0.0.1:8069;
  36. }
  37. error_page 403 /error/404.html;
  38. error_page 404 /error/404.html;
  39. error_page 500 502 503 504 /error/50x.html;
  40. location /error/ {
  41. alias %home%/%user%/web/%domain%/document_errors/;
  42. }
  43. location ~* "/\.(htaccess|htpasswd)$" {
  44. deny all;
  45. return 404;
  46. }
  47. location /vstats/ {
  48. alias %home%/%user%/web/%domain%/stats/;
  49. include %home%/%user%/conf/web/%domain%.auth*;
  50. }
  51. include /etc/nginx/conf.d/phpmyadmin.inc*;
  52. include /etc/nginx/conf.d/phppgadmin.inc*;
  53. include /etc/nginx/conf.d/webmail.inc*;
  54. include %home%/%user%/conf/web/snginx.%domain%.conf*;
  55. }