Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
6 ตอบกลับ
64338 มุมมอง

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?

ผู้เขียน

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

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; }

ผู้เขียน คำตอบที่ดีที่สุด

It works great with the following config:

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

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

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

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

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?

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

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.

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

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?

ผู้เขียน คำตอบที่ดีที่สุด

Has anyone tried a reverse proxy on OpenERP 8?

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
0
ต.ค. 24
1497
3
มี.ค. 18
3879
0
ก.พ. 18
3673
0
พ.ค. 16
4978
V7 and Proxy mode failed on partner list แก้ไขแล้ว
2
มี.ค. 15
12004