Odoo Help


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.


Preserving Clients Remote Adress when running ODOO Behind Apache SSL Proxy

Eugen Don
on 8/24/14, 8:09 AM 52,239 views

Hello Friends,

Im am runing a ODOO Trunk behind a apache 2 ssl proxy configuration, the openerp-server listens to interface

I discovered the problem that the client ip adresses are not preserved in the log, but instead the log writes the internal ip


I have tried mod_remoteip, mod_rpaf and x-forwarded-for without any results.

Is there anyone out there who managed to sucessfully preserve the clients IP-Adresses when running ODOO behind a Apache Proxy???

thats the log:

12] "GET /web/static/src/css/base.css HTTP/1.1" 200 -
2014-08-24 11:57:13,154 20396 INFO ? werkzeug: - - [24/Aug/2014 11:57:
13] "GET /web/static/src/img/form_sheetbg.png HTTP/1.1" 304 -
2014-08-24 11:57:13,155 20396 INFO ? werkzeug: - - [24/Aug/2014 11:57:
13] "GET /web/static/src/img/logo2.png HTTP/1.1" 304 -

Heres the Vhost config: I know its a mess :D


<VirtualHost 81.x.xx.xx.:443 >
        ServerName "domain:443"
        ServerAlias "*.domain.de" // Use this if you want dbfillter on subdomain
        ServerAdmin "me@mymail.com"
        UseCanonicalName on

  ErrorLog /var/log/openerp/openerp-error.log
            CustomLog /var/log/openerp/openerp-access.log combined

            SSLCertificateFile /etc/ssl/openerp/server.crt
         SSLCertificateKeyFile /etc/ssl/openerp/server.key

        <Proxy *>
            Order deny,allow
            Allow from all
        ProxyRequests Off
        ProxyVia On
        ProxyPreserveHost On
ProxyPass / retry=1 acquire=3000 timeout=1800 Keepalive=On

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
RewriteRule ^(.*) - [E=CLIENT_IP:%{REMOTE_ADDR},L]
RequestHeader set x-forwarded-for %{CLIENT_IP}e
RemoteIPHeader x-forwarded-for


        LogLevel warn
        RequestHeader set "X-Forwarded-Proto" "https"

        # Fix IE problem (httpapache proxy dav error 408/409)
        SetEnv proxy-nokeepalive 1




hi, do you have a solution for this problem? I also have similar problem when using nginx.

Ben Bernard
on 8/29/14, 6:43 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

4 follower(s)


Asked: 8/24/14, 8:09 AM
Seen: 52239 times
Last updated: 3/16/15, 8:10 AM