I deploy OpenERP behind nginx (1.7.4). My nginx configuration is simple near default, just proxying 80 to 8069. OpenERP is serving in port 8069. I set proxy_mode to True in openerp-server.conf. I also edit file wsgi_server.py in method application to allow HTTP_X_FORWARDED_FOR key in environ.
if config['proxy_mode'] and ('HTTP_X_FORWARDED_HOST' in environ or 'HTTP_X_FORWARDED_FOR' in environ):
environ['HTTP_X_FORWARDED_HOST'] = environ['HTTP_X_FORWARDED_FOR']
return werkzeug.contrib.fixers.ProxyFix(application_unproxied)(environ, start_response)
I use werkzeug version 0.9.4.
The result is I still get local ip, 127.0.0.1, in the werkzeug info log, even though I access the server from another IP. Howto show real client IP in werkzeug log if OpenERP serve behind reverse-proxy?
 https://www.odoo.com/forum/help-1/question/nginx-reverse-proxy-on-80-443-32052, my nginx configuration is similar to this
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
|Asked: 8/29/14, 5:34 AM|
|Seen: 6612 times|
|Last updated: 10/20/15, 8:15 AM|