docker_images/odoo/nginx/odoo.conf

44 lines
1.3 KiB
Plaintext

upstream ${ODOO_SERVICE}server {
server ${ODOO_SERVICE}:8069 fail_timeout=300s;
}
upstream ${ODOO_SERVICE}longpoll {
server ${ODOO_SERVICE}:8072 fail_timeout=300s;
}
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;
gzip on;
gzip_min_length 256;
gzip_types text/plain application/x-javascript application/json text/xml text/css;
gzip_vary on;
location / {
proxy_pass http://${ODOO_SERVICE}server;
proxy_http_version 1.1;
proxy_read_timeout 300;
proxy_set_header Host ${DOLLSIGN}http_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_set_header X-Forwarded-Host ${DOLLSIGN}http_host;
proxy_redirect off;
}
location /longpolling {
proxy_pass http://${ODOO_SERVICE}longpoll;
proxy_set_header Host ${DOLLSIGN}http_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_set_header X-Forwarded-Host ${DOLLSIGN}http_host;
proxy_redirect off;
}
}