OpenERP 7.0 behind Apache2 reverse proxy not responding

Asked by Marek Stopka

Hello,
I am trying to deploy OpenERP 7.0 on a internal server behind Apache2 reverse-proxy on a address http://prod.openerp.perlur.cz/, my internal prod-backend.kosare.perlur.cz is running on a http://10.10.2.6:8069/ and I can access it and log-in just fine... However behind Apache 2 reverse-proxy it does not work...

My Apache configuration is

<VirtualHost *:80>
    ServerName prod.openerp.perlur.cz

    ProxyRequests Off
    ProxyPreserveHost On
    <Proxy *>
        AddDefaultCharset off
        Order deny,allow
        Allow from all
    </Proxy>

    SetEnv proxy-nokeepalive 1

    ProxyPass / http://10.10.2.6:8069/
    ProxyPassReverse / http://10.10.2.6:8069/

    LogLevel debug
    ProxyVia On

    # Custom log file locations
    ErrorLog /var/log/apache2/prod.openerp.perlur.cz_error.log
    CustomLog /var/log/apache2/prod.openerp.perlur.cz_access.log combined
</VirtualHost>

and all I can find in a log is

[Wed Mar 06 17:19:57 2013] [debug] mod_proxy_http.c(56): proxy: HTTP: canonicalising URL //10.10.2.6:8069/
[Wed Mar 06 17:19:57 2013] [debug] proxy_util.c(1506): [client 82.209.54.74] proxy: http: found worker http://10.10.2.6:8069/ for http://10.10.2.6:8069/
[Wed Mar 06 17:19:57 2013] [debug] mod_proxy.c(1020): Running scheme http handler (attempt 0)
[Wed Mar 06 17:19:57 2013] [debug] mod_proxy_http.c(1973): proxy: HTTP: serving URL http://10.10.2.6:8069/
[Wed Mar 06 17:19:57 2013] [debug] proxy_util.c(2011): proxy: HTTP: has acquired connection for (10.10.2.6)
[Wed Mar 06 17:19:57 2013] [debug] proxy_util.c(2067): proxy: connecting http://10.10.2.6:8069/ to 10.10.2.6:8069
[Wed Mar 06 17:19:57 2013] [debug] proxy_util.c(2193): proxy: connected / to 10.10.2.6:8069
[Wed Mar 06 17:19:57 2013] [debug] proxy_util.c(2444): proxy: HTTP: fam 2 socket created to connect to 10.10.2.6
[Wed Mar 06 17:19:57 2013] [debug] proxy_util.c(2576): proxy: HTTP: connection complete to 10.10.2.6:8069 (10.10.2.6)
[Wed Mar 06 17:19:58 2013] [debug] proxy_util.c(1818): proxy: grabbed scoreboard slot 2 in child 10754 for worker http://10.10.2.6:8069/
[Wed Mar 06 17:19:58 2013] [debug] proxy_util.c(1837): proxy: worker http://10.10.2.6:8069/ already initialized
[Wed Mar 06 17:19:58 2013] [debug] proxy_util.c(1934): proxy: initialized single connection worker 2 in child 10754 for (10.10.2.6)
[Wed Mar 06 17:19:59 2013] [debug] proxy_util.c(1818): proxy: grabbed scoreboard slot 2 in child 10755 for worker http://10.10.2.6:8069/
[Wed Mar 06 17:19:59 2013] [debug] proxy_util.c(1837): proxy: worker http://10.10.2.6:8069/ already initialized
[Wed Mar 06 17:19:59 2013] [debug] proxy_util.c(1934): proxy: initialized single connection worker 2 in child 10755 for (10.10.2.6)
[Wed Mar 06 17:19:59 2013] [debug] proxy_util.c(1818): proxy: grabbed scoreboard slot 2 in child 10756 for worker http://10.10.2.6:8069/
[Wed Mar 06 17:19:59 2013] [debug] proxy_util.c(1837): proxy: worker http://10.10.2.6:8069/ already initialized
[Wed Mar 06 17:19:59 2013] [debug] proxy_util.c(1934): proxy: initialized single connection worker 2 in child 10756 for (10.10.2.6)

which is not much of a help. I also have proxy_mode = True in my openerp-server.conf as well as my launcher of OpenERP includes --proxy-mode on a command line...

/usr/bin/python /usr/bin/openerp-server --config=/etc/openerp-server.conf --proxy-mode -s

Does anybody have any clue, why I cannot get OpenERP running behind Apache2 reverse proxy?

Question information

Language:
English Edit question
Status:
Solved
For:
Odoo Web (MOVED TO GITHUB) Edit question
Assignee:
No assignee Edit question
Solved by:
Marek Stopka
Solved:
Last query:
Last reply:
Revision history for this message
Davide Corio (enlightx-deactivatedaccount) said :
#1

try with:

RewriteEngine on
RewriteRule ^/(.*) http://server_ip:8069/$1 [P]
ProxyPassReverse / http://server_ip:8069/

Revision history for this message
Marek Stopka (marek-stopka) said :
#2

Hi Davide, thanks for your reply. I have tried to add Rewrite Rules as you suggested, however it has no impact :-(

Revision history for this message
Davide Corio (enlightx-deactivatedaccount) said :
#3

what's the config you used this time?

retry with:

<VirtualHost *:80>
    ServerName prod.openerp.perlur.cz

    RewriteEngine on
    RewriteRule ^/(.*) http://10.10.2.6:8069/$1 [P]
    ProxyPassReverse / http://10.10.2.6:8069/

</VirtualHost>

without adding anything else.

run openerp normally without proxy_mode

Revision history for this message
Davide Corio (enlightx-deactivatedaccount) said :
#4

btw, be sure your apache can talk to openerp on the right port :)

FYI: launchpad answers have been moved on help.openerp.com

Revision history for this message
Marek Stopka (marek-stopka) said :
#5

Interesting, when I try to access static content (http://prod.openerp.perlur.cz/web/static/src/img/favicon.ico) it works fine, but a OpenERP webapp still does not work even with your configuration.

Revision history for this message
Marek Stopka (marek-stopka) said :
#6

For some unknown reason, I am unable to download http://10.10.2.6:8069/web/webclient/js from Apache webserver, I believe it is a cause of my problems...

websrv01:/etc/apache2/vhosts.d # wget -vvvvvvvvvvvvvv http://10.10.2.6:8069/web/webclient/js
--2013-03-06 18:27:39-- http://10.10.2.6:8069/web/webclient/js
Connecting to 10.10.2.6:8069... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1846380 (1.8M) [application/javascript]
Saving to: `js'

 0% [ ] 0 --.-K/s ^C
websrv01:/etc/apache2/vhosts.d #

Revision history for this message
Marek Stopka (marek-stopka) said :
#7

Hi, problem was on my side... I had wrongly configured MTU on interfaces between proxy server and openerp backend... But it works fine now. Thanks for your help!

Revision history for this message
prakash jain (prakash-jain) said :
#8

Hi, i am facing the same issue Proxy openerp server conf not respond can u please explain in detail how to solve this issue?