odoo.stpl 1.9 KB

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