Http proxy with ssl procedure

Asked by Nhomar - Vauxoo

Hello all.

After configure apache with ssl and proxy, the client working in embeded mode with server i receive this error:

2012-06-30 16:40:14,237 26090 ERROR ? werkzeug: 127.0.0.1 - - [30/Jun/2012 16:40:14] code 400, message Bad request syntax ('\x80g\x01\x03\x01\x00N\x00\x00\x00\x10\x00\x009\x00\x008\x00\x005\x00\x00\x16\x00\x00\x13\x00\x00')

Im almost sure something i ave wrong because in v6.0 i should configure some stuff on client-web config file, in V6.1 i just det proxy_mode = True but i never said in any place that the conexion will be secure by net_rpc.

Somebody can enlight me ?.

Thanks everybody.

my server config file: http://pastebin.com/ffn0wy4h
My apache VH : http://pastebin.com/DNYFPvTs

Question information

Language:
English Edit question
Status:
Solved
For:
Odoo Web (MOVED TO GITHUB) Edit question
Assignee:
No assignee Edit question
Solved by:
Nhomar - Vauxoo
Solved:
Last query:
Last reply:

This question was reopened

Revision history for this message
Olivier Dony (Odoo) (odo-openerp) said :
#1

There seems to be a typo in your Apache vhost. You're proxying using HTTPS rather than HTTP, while OpenERP expects plain http on port 8069. You have this:

              ProxyPass / https://localhost:8069/
              ProxyPassReverse / https://localhost:8069/

Replace the above with plain 'http' protocol, the secure HTTP connection happens between the user and Apache, not between Apache and OpenERP:

              ProxyPass / http://localhost:8069/
              ProxyPassReverse / http://localhost:8069/

The rest looks fine :-)

Revision history for this message
Nhomar - Vauxoo (nhomar) said :
#2

Hello Oliver.

My VH stay in this way:

              ProxyPass / http://localhost:8069/
              ProxyPassReverse / https://localhost:8069/

But your comment enlight me....

Thanks a lot....

Revision history for this message
Olivier Dony (Odoo) (odo-openerp) said :
#3

As far as I understand your setup, the right hand side of the ProxyPassReverse directive should be using a plain HTTP scheme too, because it's really the same value as for ProxyPass. But I don't think it matters, Apache will match URLs in ProxyPassReverse regardless of the URL scheme (at least that's what it does in my local install).
If you are having trouble with redirects (this is what ProxyPassReverse is for), make sure you start OpenERP 6.1 with the --proxy parameter, and make sure you are using werkzeug 0.8+ (pip install werkzeug --upgrade). That should take care of SSL redirects.

Revision history for this message
Nhomar - Vauxoo (nhomar) said :
#4

Ok.

I update this question to have as doc reference (soon in doc.openerp.com)

As Oliver Said:

              ProxyPass / http://localhost:8069/
              ProxyPassReverse / http://localhost:8069/

Is the correct way to do this.

If you install on ubuntu:

- sudo apt-get install python-wekzeug, dont worry about it, make the upgrade:

# sudo apt-get install python-pip
# pip install werkzeug --upgrade

Thanks Oliver, i will be in the docs to have this as reference.

regards.

Revision history for this message
Nhomar - Vauxoo (nhomar) said :
#5

Problem is marked as solved by me.