forked from it-projects-llc/install-odoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx_odoo.conf
52 lines (41 loc) · 1.35 KB
/
nginx_odoo.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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;
}
}
server {
listen 443;
#server_name {{ODOO_DOMAIN}};
include odoo_params;
## ssl certificate files
ssl on;
ssl_certificate {{SSL_CERT}};
ssl_certificate_key {{SSL_KEY}};
## ssl log files
access_log /var/log/nginx/{{ODOO_USER}}-access.log;
error_log /var/log/nginx/{{ODOO_USER}}-error.log;
# Let the OpenERP web service know that we’re using HTTPS,
# otherwise it will generate URL using http:// and not https://
proxy_set_header X-Forwarded-Proto https;
location /longpolling {
proxy_pass http://127.0.0.1:8072;
}
location / {
proxy_pass http://127.0.0.1:8069;
}
# cache some static data in memory for 90mins.
# under heavy load this should relieve stress on the odoo web interface a bit.
location ~* /web/static/ {
proxy_cache_valid 200 90m;
proxy_buffering on;
expires 864000;
proxy_pass http://127.0.0.1:8069;
}
}