Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- upstream odoo {
- server 127.0.0.1:8069;
- }
- upstream odoochat {
- server 127.0.0.1:8072;
- }
- server {
- listen 80;
- server_name 999.go-tropa.com;
- rewrite ^(.*) https://$host$1 permanent;
- }
- server {
- listen 443;
- server_name 999.go-tropa.com;
- proxy_read_timeout 720s;
- proxy_connect_timeout 720s;
- proxy_send_timeout 720s;
- proxy_ssl_name_localhost;
- ssl on;
- ssl_certificate /etc/letsencrypt/live/999.go-tropa.com/fullchain.pem;
- ssl_certificate_key /etc/letsencrypt/live/999.go-tropa.com/privkey.pem;
- ssl_session_timeout 30m;
- ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
- 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";
- ssl_prefer_server_ciphers on;
- access_log /var/log/nginx/odoo.access.log;
- error_log /var/log/nginx/odoo.error.log;
- gzip on;
- gzip_types text/css text/scss text/plain text/xml application/xml application/json application/javascript;
- proxy_set_header X-Forwarded-Host $host;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_set_header X-Forwarded-Proto $scheme;
- proxy_set_header X-Real-IP $remote_addr;
- # Manage longpolling on 8072 port
- location /longpolling {
- proxy_pass http://odoochat;
- }
- # Redirect requests to odoo server on 8069
- location / {
- proxy_redirect off;
- proxy_pass http://odoo;
- }
- # Enable static cache
- location ~* /web/static/ {
- proxy_cache_valid 200 60m;
- proxy_buffering on;
- expires 864000;
- proxy_pass http://odoo;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement