Odoo Help

Welcome!

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.

2

How to get rid of :8069 part in the URL?

By
Jaime
on 3/20/13, 11:45 PM 60,153 views

Hello...

I connect currently to my ERP server by using port 8069, this way: http://myserver:8069.

Since Apache is listening in port 80, and OpenERP server is in port 8069, I cannot make OpenERP to listen in port 80.

Is there a way to configure Apache so that when received the request, it load the content of port 8069? maybe by mean of a Proxy in virtual host definition, but I don't know how. Also, I tried to use .htaccess but a redirection occurs instead, and what I want is not to show the port number.

Any help will be appreciated,

regards, Jaime

3

Yes, add a virtual host with Proxy to your apache config:

<virtualhost *:80=""> ServerName myserver ServerAdmin webclient@localhost

  <Proxy>
       Order deny,allow
       Allow from all
  </Proxy>

  ProxyRequests Off

  ProxyPass / http://127.0.0.1:8069/
  ProxyPassReverse / http://127.0.0.1:8069/

  # Fix IE problem (http error 408/409)
  SetEnv proxy-nokeepalive 1
  ErrorLog /var/log/apache2/webclient-error.log
  CustomLog /var/log/apache2/webclient-access.log combined

</virtualhost>

And then add the --proxy-mode option to openerp-server

This works with 6.1 and 7.0

Thanks a lot... it worked, but I got an undesiderable behavior. I configured OpenERP with multiple databases, so that the chosen database will be given by the hostname. So by using 127.0.0.1 OpenERP are not able to choose the database. I changed proxy settings to be http://database.mydomain.com:8069, but Apache get stuck not actually getting the login page. If I use directly http://database.mydomain.com:8069 in browser URL, it works. Is there a way to solve this? Thanks.

Jaime
on 3/21/13, 8:40 AM

I have finally used:

ProxyPass / http://127.0.0.1:8069/ ProxyPassReverse / http://database.mydomain.com:8069/

and it works.. I don't know the real meaning of that. Do you know the explanation?

Thanks Jaime

Jaime
on 3/21/13, 9:09 AM

I looked up --proxy-mode, and found some info at server/openerp/service/wsgi_server.py L421 and werkzeug.pocoo.org/docs/contrib/fixers/?highlight=proxyfix#werkzeug.contrib.fixers.ProxyFix

Rick Leir
on 8/16/13, 1:52 PM
3

Daniel Reis

--Daniel Reis--
3436
| 6 7 9
Lisbon, Portugal
--Daniel Reis--

Author of the "Odoo Development Essentials" book.

Applications Manager at Securitas Portugal

Github: https://github.com/dreispt

Twitter; @reis_pt


Daniel Reis
On 3/21/13, 6:00 AM

Not the answer to your question, but other people might like to know that you don't need a web server, such Apache or Nginx, to make OpenERP available on port 80.

Just start the OpenERP server with option --xmlrpc-port=80.

what makes you think I am using Apache in order to make OpenERP available?

Jaime
on 3/21/13, 7:22 AM

You say "Since Apache is listening in port 80". If you don't have a good reason to add Apache to your stack, throw it away: OpenERP has it's own web server and can work standalone.

Daniel Reis
on 3/21/13, 6:56 PM

So, what makes you think I don't have any other websites? I host several domains in the machine (belonging to a lot of customers), all of them with websites, including access to cPanel, WHM, phpMyAdmin, phpPgAdmin, and so on..... I don't even want to imagine what will happen if I throw Apache away. Regards.

Jaime
on 3/21/13, 7:22 PM

By the way.. I have solved the problem with ProxyReverse feature of apache :-)

Jaime
on 3/21/13, 7:27 PM

don't use --xmlrpc-port=80 because it is a privileged port and openerp does not run as root. maybe you can use 80 with the help of setcap stackoverflow.com/questions/413807/is-there-a-way-for-non-root-processes-to-bind-to-privileged-ports-1024-on-l

Rick Leir
on 8/16/13, 2:01 PM
1
Arnis
On 3/21/13, 5:40 AM

You can use reverse proxy server. We are using Nginx. Search google "reverse proxy" for instructions.

0
Rick Leir
On 8/18/13, 8:05 AM

See help.openerp.com/question/28288/how-does-proxy-mode-help/

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

2 follower(s)

Stats

Asked: 3/20/13, 11:45 PM
Seen: 60153 times
Last updated: 3/16/15, 8:10 AM