Community mailing list archives
community@mail.odoo.com
Browse archives
Re: Create virtual hosts for odoo website on nginx (server blocks)
RE: Create virtual hosts for odoo website on nginx (server blocks)
Re: Create virtual hosts for odoo website on nginx (server blocks)
byHi,
here is an example which is currently running as reverse proxy for odoo
--------------------------------------------------------------------------------------------
upstream odoo-server {
server 127.0.0.1:8069 weight=1 fail_timeout=0;
}
upstream odoo-server-im {
server 127.0.0.1:8326 weight=1 fail_timeout=0;
}
## http redirects to https ##
server {
listen 80;
server_name
# Strict Transport Security
add_header Strict-Transport-Security max-age=2592000;
rewrite ^/.*$ https://$host$request_uri? permanent;
#return 301 https://$host$request_uri;
}
server {
listen 443;
server_name
# Specifies the maximum accepted body size of a client request,
# as indicated by the request header Content-Length.
client_max_body_size 200m;
# ssl certificate files
ssl on;
ssl_certificate /etc/ssl/certs/abcd.xyz.crt;
ssl_certificate_key /etc/ssl/private/acd.xzy.key;
# ssl log files
access_log /var/log/nginx/odoo-access.log;
error_log /var/log/nginx/odoo-error.log;
# add ssl specific settings
keepalive_timeout 90;
# increase proxy buffer to handle some OpenERP web requests
proxy_buffers 16 64k;
proxy_buffer_size 128k;
#general proxy settings
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503;
# set headers
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;
# 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;
# by default, do not forward anything
proxy_redirect off;
proxy_buffering off;
location / {
proxy_pass http://odoo-server;
}
location /longpolling {
proxy_pass http://odoo-server-im;
}
# 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://odoo-server;
}
}
--------------------------------------------------------------------------------------------
Best regards
Bassirou Ndaw
From: Yassine Teimi [mailto:yteimi01@gmail.com]
Sent: Freitag, 16. Oktober 2015 20:32
To: Community <community@mail.odoo.com>
Subject: Re: Create virtual hosts for odoo website on nginx (server blocks)
I'm using nginx as a reverse proxy, does it impact the virtual host (server block) creation ?
2015-10-16 19:03 GMT+01:00 Yassine Teimi <yteimi01@gmail.com>:
Dears,
I've created a server blocks (on nginx) or virtual host (on apache), i want someone to share his virtual host created under nginx, so as to compare with mine, then i'll feed you guys more informations about my concern.
Thanks for your answers.
--
Cordialement
Yassine TEIMI
Consultant & Odoo Project Manager
TEL : +212 6-27 33 30 78
_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe
Reference
-
Create virtual hosts for odoo website on nginx (server blocks)
byYassine TEIMI-
Re: Create virtual hosts for odoo website on nginx (server blocks)
byYassine TEIMI -
Re: Create virtual hosts for odoo website on nginx (server blocks)
byHoussine BAKKALI -
Re: Create virtual hosts for odoo website on nginx (server blocks)
byYassine TEIMI -
Re: Create virtual hosts for odoo website on nginx (server blocks)
byHoussine BAKKALI -
Re: Create virtual hosts for odoo website on nginx (server blocks)
byHoussine BAKKALI -
Re: Create virtual hosts for odoo website on nginx (server blocks)
byYassine TEIMI -
Re: Create virtual hosts for odoo website on nginx (server blocks)
byHoussine BAKKALI -
Re: Create virtual hosts for odoo website on nginx (server blocks)
byYassine TEIMI -
Re: Create virtual hosts for odoo website on nginx (server blocks)
byHoussine BAKKALI -
Re: Create virtual hosts for odoo website on nginx (server blocks)
byYassine TEIMI
-