Advertisement
Guest User

Untitled

a guest
Jan 18th, 2020
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.71 KB | None | 0 0
  1. upstream odoo {
  2. server 127.0.0.1:8069;
  3.  
  4. }
  5.  
  6. upstream odoochat {
  7.  
  8. server 127.0.0.1:8072;
  9. }
  10. server {
  11.  
  12. listen 80;
  13. server_name 999.go-tropa.com;
  14. rewrite ^(.*) https://$host$1 permanent;
  15.  
  16. }
  17.  
  18. server {
  19. listen 443;
  20. server_name 999.go-tropa.com;
  21. proxy_read_timeout 720s;
  22. proxy_connect_timeout 720s;
  23. proxy_send_timeout 720s;
  24.  
  25.  
  26. proxy_ssl_name_localhost;
  27. ssl on;
  28. ssl_certificate /etc/letsencrypt/live/999.go-tropa.com/fullchain.pem;
  29. ssl_certificate_key /etc/letsencrypt/live/999.go-tropa.com/privkey.pem;
  30. ssl_session_timeout 30m;
  31. ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  32. ssl_ciphers "ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384";
  33. ssl_prefer_server_ciphers on;
  34.  
  35. access_log /var/log/nginx/odoo.access.log;
  36. error_log /var/log/nginx/odoo.error.log;
  37.  
  38. gzip on;
  39. gzip_types text/css text/scss text/plain text/xml application/xml application/json application/javascript;
  40.  
  41. proxy_set_header X-Forwarded-Host $host;
  42. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  43. proxy_set_header X-Forwarded-Proto $scheme;
  44. proxy_set_header X-Real-IP $remote_addr;
  45.  
  46. # Manage longpolling on 8072 port
  47. location /longpolling {
  48. proxy_pass http://odoochat;
  49. }
  50.  
  51. # Redirect requests to odoo server on 8069
  52. location / {
  53. proxy_redirect off;
  54. proxy_pass http://odoo;
  55. }
  56.  
  57. # Enable static cache
  58. location ~* /web/static/ {
  59. proxy_cache_valid 200 60m;
  60. proxy_buffering on;
  61. expires 864000;
  62. proxy_pass http://odoo;
  63.  
  64. }
  65.  
  66. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement