Skip to content

Instantly share code, notes, and snippets.

@jovanimoura
Forked from repodevs/nginx_odoo.conf
Created November 28, 2017 17:26
Show Gist options
  • Save jovanimoura/c8aed02a90ed7e9c2ed2bf7208254dd4 to your computer and use it in GitHub Desktop.
Save jovanimoura/c8aed02a90ed7e9c2ed2bf7208254dd4 to your computer and use it in GitHub Desktop.
odoo nginx config
server {
listen 80 default_server;
#rewrite ^/.*$ https://$host$request_uri? permanent; #Uncomment this line in case you want to use https only
#server_name {{ODOO_DOMAIN}};
include odoo_params;
location /longpolling {
proxy_pass http://127.0.0.1:8072;
}
location / {
proxy_pass http://127.0.0.1:8069;
}
}
charset utf-8;
location = /favicon.ico {
return 404;
}
## increase proxy buffer to handle some OpenERP web requests
proxy_buffers 16 64k;
proxy_buffer_size 128k;
## set headers
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_read_timeout 600s; #set centrally in nginx.conf
client_max_body_size 200m;
#general proxy settings
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503;
# by default, do not forward anything
proxy_redirect off;
proxy_buffering off;
location ~* /web/static/ {
proxy_cache_valid 200 90m;
proxy_buffering on;
expires 864000;
proxy_pass http://127.0.0.1:8069;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment