docker_images/odoo/nginx/odoo.conf

40 lines
1.3 KiB
Plaintext
Raw Normal View History

upstream ${ODOO_SERVICE}server {
server ${ODOO_SERVICE}:8069 fail_timeout=300s;
2016-09-30 15:03:26 +02:00
}
upstream ${ODOO_SERVICE}longpoll {
server ${ODOO_SERVICE}:8072 fail_timeout=300s;
2016-09-30 15:03:26 +02:00
}
server {
2017-07-01 15:55:22 +02:00
listen ${NGINX_PORT};
2016-09-30 15:03:26 +02:00
server_name ${ODOO_SERVER_NAMES};
2017-08-04 17:08:57 +02:00
return 301 https://${DOLLSIGN}host:${NGINX_SSL_PORT}${DOLLSIGN}request_uri;
2016-09-30 15:03:26 +02:00
}
server {
2017-07-01 15:55:22 +02:00
listen ${NGINX_SSL_PORT} ssl;
2016-09-30 15:03:26 +02:00
server_name ${ODOO_SERVER_NAMES};
2016-12-04 19:35:49 +01:00
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;
proxy_read_timeout 720s;
proxy_connect_timeout 720s;
proxy_send_timeout 720s;
2017-07-01 16:19:13 +02:00
proxy_set_header Host ${DOLLSIGN}http_host;
proxy_set_header X-Forwarded-Host ${DOLLSIGN}http_host;
proxy_set_header X-Forwarded-For ${DOLLSIGN}proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto ${DOLLSIGN}scheme;
proxy_set_header X-Real-IP ${DOLLSIGN}remote_addr;
location / {
proxy_pass http://${ODOO_SERVICE}server;
2017-07-01 16:19:13 +02:00
proxy_redirect off;
# proxy_redirect http://${DOLLSIGN}http_host/ https://${DOLLSIGN}host:${DOLLSIGN}server_port/;
2016-09-30 15:03:26 +02:00
}
location /longpolling {
proxy_pass http://${ODOO_SERVICE}longpoll;
2016-09-30 15:03:26 +02:00
}
}