Community mailing list archives

community@mail.odoo.com

Re: Create virtual hosts for odoo website on nginx (server blocks)

by
Yassine TEIMI
- 10/16/2015 15:56:12
On server_name why you use "xxxx.example.com" is it mandatory ?

2015-10-16 20:53 GMT+01:00 Yassine Teimi <yteimi01@gmail.com>:
Thanks for your anwser, 

Usually with other CMS we use a root parameter, where the website files resides, with Odoo how is it handled ? I can't see any routing parameter in your files ? 

Regards.

2015-10-16 20:33 GMT+01:00 Bassirou Ndaw <b.ndaw@ergobit.org>:

Hi,

 

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  

                           xxxx.ergobit.org

                           yyyy.ergobit.org ;

             # 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  

                           xxxx.ergobit.org

                           yyyy.ergobit.org ;

 

    # 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




--

Cordialement

Yassine TEIMI

Consultant & Odoo Project Manager
TEL : +212 6-27 33 30 78



--

Cordialement

Yassine TEIMI

Consultant & Odoo Project Manager
TEL : +212 6-27 33 30 78