Community mailing list archives

nginx proxy config

Csaba Tóth
- 05/10/2016 15:02:48

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;