Skip to content

Instantly share code, notes, and snippets.



Created Apr 15, 2019
What would you like to do?
Odoo basic nginx conf
#odoo server
upstream odoo {
upstream odoochat {
# http -> https
# server {
# listen 80;
# server_name;
# rewrite ^(.*) https://$host$1 permanent;
server {
listen 80;
server_name *;
proxy_read_timeout 720s;
proxy_connect_timeout 720s;
proxy_send_timeout 720s;
# Add Headers for odoo proxy mode
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;
proxy_set_header Host $http_host;
proxy_set_header X-Scheme $scheme;
proxy_set_header REMOTE_ADDR $remote_addr;
# log
access_log /var/log/nginx/odoo.access.log;
error_log /var/log/nginx/odoo.error.log;
# Redirect longpoll requests to odoo longpolling port
location /longpolling {
proxy_pass http://odoochat;
# Redirect requests to odoo backend server
location / {
proxy_redirect off;
proxy_pass http://odoo;
# common gzip
gzip_types text/css text/scss text/plain text/xml application/xml application/json application/javascript;
gzip on;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.