docker_images/odoo/nginx/odoo.conf

38 lines
984 B
Plaintext
Raw Normal View History

2016-09-30 15:03:26 +02:00
upstream odooserver {
server ${ODOO_SERVICE}:8069 fail_timeout=300s;
2016-09-30 15:03:26 +02:00
}
upstream odoolongpoll {
server ${ODOO_SERVICE}:8072 fail_timeout=300s;
2016-09-30 15:03:26 +02:00
}
server {
listen 80;
server_name ${ODOO_SERVER_NAMES};
return 301 https://${DOLLSIGN}host${DOLLSIGN}request_uri;
}
server {
listen 443 ssl;
server_name ${ODOO_SERVER_NAMES};
client_max_body_size 200M;
location / {
proxy_pass http://odooserver;
proxy_http_version 1.1;
proxy_read_timeout 300;
proxy_set_header Host ${DOLLSIGN}host;
proxy_set_header X-Real-IP ${DOLLSIGN}remote_addr;
proxy_set_header X-Forward-For ${DOLLSIGN}proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
proxy_redirect off;
}
location /longpolling {
proxy_pass http://odoolongpoll;
proxy_set_header Host ${DOLLSIGN}host;
proxy_set_header X-Real-IP ${DOLLSIGN}remote_addr;
proxy_set_header X-Forward-For ${DOLLSIGN}proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
proxy_redirect off;
}
}