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

change to port 80 instead of 8069

By
Jad Tabet
on 7/1/13, 12:39 PM 39,613 views

Hello, Am running OpenERP v7.0 on Ubuntu release 11 , I want to change the web application port to 80 instead of 8069.

I tried the following: my configuration file is /etc/openerp/openerp-server.conf It contained only the information relative to the database, I added to it xmlrpc_port = 80 and xmlrpc = True.

when I rebooted openerp , the web application didnt' restart.

Did you look at the server log?

Daniel Reis
on 7/1/13, 1:45 PM

Then add the following lines to your httpd.conf:

SetEnv force-proxy-request-1.0 1
ProxyPass / <a href="http://127.0.0.1:8069/">http://127.0.0.1:8069/</a>
ProxyPassReverse / <a href="http://127.0.0.1:8069/">http://127.0.0.1:8069/</a>

The port and the IP address can/must be changed if you used different IP/port.

Free Office Solutions
on 9/2/13, 10:11 AM
5

Brett Lehrer

--Brett Lehrer--
1252
| 5 4 8
Milwaukee, United States
--Brett Lehrer--
Director of IT and open source enthusiast.
Brett Lehrer
On 8/31/13, 7:03 PM

I've had trouble just changing the port to 80 as well. I suspect you'll run into the same problem with any other port under 1024. The quick, dumb, and effective fix is to just throw in an iptables line to forward traffic on port 80 to port 8069. This script will add the line into your current configuration:

#!/bin/bash
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8069
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 443 -j REDIRECT --to-port 8070
iptables-save

Make sure to change eth0 if needed. Also threw in HTTPS settings too, but if you want to use HTTPS you might as well set up a reverse proxy in nginx. Article is about a year old but follow the steps and it should work perfectly on 7.0.

This change doesn't last through a reboot though, so you'll have to do a bit more work to get it to persist, but this will certainly get you started.

What a beautiful solution, never thought of IP Tables. if you want to make the script boot at startup. https://help.ubuntu.com/community/IptablesHowTo

Libatelqa, Jad Tabet
on 9/1/13, 4:58 AM

In debian, to make it persistent use the iptables-persistent package.

Jairo Llopis
on 12/18/13, 8:03 AM
0
Landis Arnold
On 5/24/15, 1:23 PM

Just spent quite a bit of time on this.

My solution would not work following the path of changing openerp-server.conf except for 

adding 127.0.0.1 at the end of xmlrpc-interface= and netrcp-interface=

OpenErp and now Odoo needs its own Ports still) (such as 8069)


Used Apache to Redirect 80 to 443 (Http invokes HTTPS)

Used a Apache Reverse Proxy to route 443 to the Server on  8069.  

8069 itself is now only can only be connected to by the Server Itself (changed setting in openerp-server.conf) so no "unsecure" html is going outbound. 

  • xmlrcp-interface=127.0.0.1

  • netrpc-interface=127.0.0.1

The whole system is running in SSL on 443 now.

I know others have done this, just needed to tie my system together and ended up seeing this post along the way.  I am sure there are several solutions.

0
Jad Tabet
On 7/1/13, 1:13 PM

Hello,

No am sure that no other service is using port 80, the port is not opened . ( tried telnet to the linux machine on port 80)

0

Hi Jad,

You might find this solution from ADempiere ERP bit more elegant: http://www.adempiere.com/Proxy_Adempiere_Through_Apache

Note that a few changes were made to fit the purpose of running OpenERP but credit goes to the author of the original post.

Set up Apache:

In httpd.conf (/etc/httpd/conf/httpd.conf in Fedora)

Enable modules for proxy (normally enabled by default):

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule proxy_http_module modules/mod_proxy_http.so

Then add the following lines to your httpd

this is test

Jaysinh Shukla (jsh)
on 9/18/14, 1:31 AM
0
Vimal Rughani
On 6/27/14, 2:29 AM

Hi All,

I know, I am too late to answer this, but this answer might be help full to other. Few days ago, I am having same issue, after searching a lot on Interent and experiment with few things, I got solution. I am working on Ubuntu 14.04 (This solution also work on Ubuntu 12.04).

  1. Go to terminal open rc.local file. rc.local file reside in etc folder.
    sudo gedit /etc/rc.local
  2. Paste this command on rc.local file and save
    iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8069
  3. Reboot Ubuntu, to see effect
    sudo reboot

This work perfectly, as per my need. I have created article on this, you can check more details here http://pulse7.net/openerp/run-odoo-port-80-instead-8069/

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

6 follower(s)

Stats

Asked: 7/1/13, 12:39 PM
Seen: 39613 times
Last updated: 11/4/16, 7:20 PM