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

What does config setting proxy_mode do?

By
thenon
on 4/30/13, 6:03 PM 3,817 views

I'm trying to set up a reverse proxy (in order to get SSL working on Windows - doesn't seem like there's any other way).

Trouble is that when I access https://foo (via the reverse proxy), OpenERP responds with a redirect to http://foo.

Setting

proxy_mode = True

does not make it leave the url alone like I'd hope. What is it supposed to do? How can I get it to not change the protocol?

Thanks

0
Mustafa Rawi
On 3/25/14, 7:26 PM

According to this:

Enable correct behavior when behind a reverse proxy

proxy_mode = True

0
Vauxoo S.A. de C.V.
On 5/1/13, 12:09 AM

Your problem is with the configuration od the web-server.

What are you using, nginx or apache2?

If you are using nginx:

upstream openerpweb {
#If the server is in other IP change localhost by the ip of openerp server
server localhost:8069 weight=1 max_fails=3 fail_timeout=30s;
#Just uncomment this line as many times as servers you have, remember change 
#the port
#server localhost:8069 weight=1 max_fails=3 fail_timeout=30s;}

server {
#If Apache is in the server change the port to avoid port conflicts.
listen 80;

###################################################################
#Here Hostname that will be called in the browser.
#Remember you should have 1.- DNS CNAME or 2.- edit your /etc/hosts
#with this name dns.example.com.
###################################################################
server_name    dns.example.com;
#Put name of instance replacing 'openerp'
#to be sure every instance manage its own log
access_log    /var/log/nginx/openerp-access-http.log;
error_log    /var/log/nginx/openerp-error-http.log;
#What will happen in root.
location / {
    proxy_pass    http://openerpweb;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;
    # by default, do not forward anything
    proxy_redirect off;
    error_page 502 = /50x.html;
}
#How we will manage static files
location ~* /web/static {
    proxy_cache_valid 200 60m;
    send_timeout 200;
    proxy_read_timeout 200;
    proxy_connect_timeout 200;
    proxy_buffering    on;
    expires 864000;
    proxy_pass    http://openerpweb;
}
#webdav stuff
#TODO This doc
 location ~* /webdav {
    proxy_cache_valid 200 60m;
    send_timeout 200;
    proxy_read_timeout 200;
    proxy_connect_timeout 200;
    proxy_buffering    on;
    expires 864000;
    proxy_pass    http://openerpweb;
}
#When Server is down, change by our own 50x.html template
#A 50x template is the html shown when openerp server fails
location = /50x.html {
    root /usr/share/nginx/www;
}}

This is the config file to use.

If you have any doubt, just make an answer ;-)

Regards.

Hi, thank you for your response - but using IIS with ARR actually. Its possible the mistake is in my configuration there, but my question still stands - what does proxy_mode do?

thenon
on 5/1/13, 6:11 AM

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

3 follower(s)

Stats

Asked: 4/30/13, 6:03 PM
Seen: 3817 times
Last updated: 3/16/15, 8:10 AM