Community mailing list archives

Re: nginx proxy config

Daniel Dico
- 05/10/2016 15:14:47
Hi Csaba,

Add the following lines to your nginx.conf in order to get the correct IP address:

set_real_ip_from  _proxy_ip_address_;
real_ip_header    X-Forwarded-For;
real_ip_recursive off;

You need to replace _proxy_ip_address_ with your IP address

Hope this helps

OERP Canada

Twitter LinkedIn


Daniel Dico

OERP Canada
3300 Bloor St. West, Unit 3140
Toronto,  ON  M8X 2X3

IMPORTANT NOTICE: This email is intended only for the use of the Person(s) to whom it was addressed. It may contain information which is privileged & confidential. Any dissemination, distribution, copying, or other use of this message, or any of its contents or attachments by any person other than the intended recipient may constitute a breach of civil or criminal law and is strictly prohibited. If you are NOT the intended recipient please contact the sender and dispose of this email as soon as possible.

On May 10, 2016, at 3:08 PM, Csaba Tóth <> wrote:


How can i configure good the proxy setting with Odoo?

I use nginx as proxy frontend, but in the log files the client IP addess
is the proxy address not the client's. I use the --proxy-mode parameter.

Below is my relevant nginx config.

What am i missing?

Thanks for helping!

charset utf-8;

client_max_body_size 100m;

# increase proxy buffer to handle some OpenERP web requests
proxy_buffering off;
proxy_buffers 16 64k;
proxy_buffer_size 128k;
proxy_busy_buffers_size 128k;

proxy_intercept_errors on;
proxy_redirect off;

add_header X-Static no;

proxy_set_header         Host $http_host;
proxy_set_header         X-Real-IP $remote_addr;
proxy_set_header         X-Forward-For $proxy_add_x_forwarded_for;
proxy_set_header         X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header         X-Forwarded-Host $http_host;
proxy_set_header         X-Forwarded-Proto $scheme;

proxy_read_timeout          6h;
proxy_connect_timeout       5s;

Post to: