Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

https reverse proxy with 8.0?

By
A. Person
on 11/28/13, 6:03 PM 56,486 views

Does anyone have an https reverse proxy working in 8.0? I have it working in 7.0 with nginx like this:

location / { proxy_pass http://127.0.0.1:8069; }

But in 8.0 it just goes to a 404 page:

http://www.example.com/web

Has anyone tried a reverse proxy on OpenERP 8?

A. Person
on 12/12/13, 8:56 PM

Can anyone help with this? The behavior is still the same as of yesterday's snapshot.

A. Person
on 1/11/14, 9:40 PM

https://www.odoo.com/forum/help-1/question/https-reverse-proxy-with-8-0-37863#answer-54179 you must tell the server, that you are using https (proxy_set_header) - a complete example for a https-Reverse-Proxy could look like this: upstream odooserver { server 127.0.0.1:8069 weight=1 fail_timeout=1800s; } server { listen 80; server_name you-domain; return 301 https://your-domain$request_uri; } location / { proxy_pass http://odooserver; # force timeouts if the backend dies 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 Odoo 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; }

Datenpol gmbh, Stefan Wailand
on 10/27/14, 5:08 AM
1
A. Person
On 1/11/14, 10:04 PM

It works great with the following config:

location / { proxy_set_header Host $host:$server_port; proxy_pass http://127.0.0.1:8069; }

2

Andreas Brueckl

--Andreas Brueckl--
5056
| 7 8 7
Vienna, Austria
--Andreas Brueckl--
OpenERP Consulting and Development
Andreas Brueckl
On 6/12/14, 5:51 AM

I have tried setting up Odoo 8.0 with a reverse proxy (NGINX) with SSL (443) but without success. Odoo always rewrites the URL to "http://" instead of "https://". Does anyone have an idea?

2
Grzegorz Żurek
On 11/4/14, 8:14 AM

When the user logs being superuser, parameter "web.base.url" is update.
If you do not want to update. Add to the model "ir.config_parameter" record with key "web.base.url.freeze".
Since then the system retrieves only parameter defined by us "web.base.url" and does not update it.

1
Stefan Wailand
On 10/27/14, 6:11 AM

This works with Odoo 8.0

you must tell the server, that you are using https (proxy_set_header) - a complete example for a https-Reverse-Proxy could look like this:

    upstream odooserver {
        server 127.0.0.1:8069 weight=1 fail_timeout=1800s;
    }

    server {
        listen 80;
        server_name you-domain;
        return 301 https://your-domain$request_uri;
    }

    location / {
            proxy_pass http://odooserver;
            # force timeouts if the backend dies
            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 Odoo 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;
        }

is that a complete /etc/nginx/sites-available/odoo8 config file?

gunnar
on 1/28/15, 5:17 AM
1

You must change the value 'web.base.url' to 'https://' under settings -> parameters -> system parameters.

-1
A. Person
On 12/12/13, 8:48 PM

Has anyone tried a reverse proxy on OpenERP 8?

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

6 follower(s)

Stats

Asked: 11/28/13, 6:03 PM
Seen: 56486 times
Last updated: 3/16/15, 8:10 AM