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.

1

How to pass openerp with nginx accessed from root on different port

By
Nic Windley
on 4/4/13, 8:31 AM 2,746 views

Hello All,

Fairly new to openerp and just getting to grips with it.

With openerp installed in a sub folder, accessible from the root URL;

www.thedomain.ext

and nginx installed, it requires passing of port 8069 to allow client access.

If a location for 8081 is already specified in the nginx conf file I believe you can only add a second port with a different location path.

It would appear that the best way to do this would be to move openerp to a sub domain ?

If not, is there a better way ?

If so, what modifications would be required to ensure openerp runs from a sub domain correctly.

Thanks,

Nic

0
Nic Windley
On 4/4/13, 8:40 AM

Oops, just realised my error. I need to ask nginx listen to the other port for openerp connections and pass them accordingly!!

UPDATE: Nope, that will just cause the binding of openerp to fail.

Hoping for some sage advice.

0

IBS

--IBS--
1302
| 4 5 8
Tétouan, Morocco
--IBS--

For more informations about IBS, please visit our website at www.ibs-na.com.

For a specific questions, collaboration or help, please send us an email to support@ibs-na.com

IBS
On 4/4/13, 9:56 AM

You have to set up a reverse proxy.

  • Go to your Nginx nginx.conf file.
  • inside http add:

    server {
        listen [DESIRED PORT];
        server_name www.thedomain.ext;
        access_log [NGINX ACCESS LOG FILE LOCATION];
        error_log [NGINX ERROR LOG FILE LOCATION];
        location / {
            proxy_pass http://127.0.0.1:[OPENERP PORT];
        }
    }
    

Note: Check if Apache is using port 80, if it is, use another port.

Thats what I had Karim. I'f I use listen 80 with proxy_pass 8069 client is not connecting. If I listen port 8069 it stops the server from binding. Was working prior to nginx install. Unless re-installing apache would break something (other than needing to reinstall nginx) ?

Nic Windley
on 4/4/13, 10:04 AM

Did you check your firewall settings? Did you restart Nginx when you set up the reverse proxy?

IBS
on 4/4/13, 10:08 AM

Also are you sure Apache is not already using port 80, did you try with another port?

IBS
on 4/4/13, 10:09 AM

Every change I made to Nginx I restarted Nginx to ensure the new conf file were picked up again. Err, yes apache is using port 80 so what port should I be listening on as this domain serves multiple purposes. It servers content on port 80 (via apache) and should / was providing openerp server via 8069. Then I installed nginx. What am I missing ?

Nic Windley
on 4/4/13, 10:14 AM

Simply use another port, for instance 8070 because 80 is already used by Apache.

IBS
on 4/4/13, 10:54 AM

Do you mean in the nginx conf file Karim ? i.e. listen 8070;

Nic Windley
on 4/4/13, 11:05 AM

Indeed Nic, also make sure you allow that port through the firewall.

IBS
on 4/4/13, 11:12 AM

OK will do.

Nic Windley
on 4/4/13, 11:14 AM

Nope, didn't work for me Karim. Server sits there waiting for connection and client fails to connect. I'm going to remove nginx and see if easyapache broke the openerp install. Thank you for your advice.

Nic Windley
on 4/4/13, 11:23 AM

Any idea if easyapache would break anything in openerp (I have to reinstall nginx if I run it) ?

Nic Windley
on 4/4/13, 11:25 AM

Does /etc/httpd/conf/httpd.conf get modified by openerp ?

Nic Windley
on 4/4/13, 11:28 AM

I am not sure, just one question, are you able to access your OpenERP server through the 8069 port?

IBS
on 4/4/13, 11:28 AM

OK, after removing nginx it looks as if the problem remains so easyapache must have modified some files that openerp changed. Can't access openerp through anyport.

Nic Windley
on 4/4/13, 11:31 AM

OpenERP doesn't modify other software's configuration files. I think you might be having a firewall issue.

IBS
on 4/4/13, 11:39 AM

I'm using the web client so I don't think its a firewall issue (it worked before and i've remove nginx for now) ? So when installing on a linux server there are no changes to other .conf or similar files that could be overwritten by something like easyapache ?

Nic Windley
on 4/4/13, 12:16 PM

Finally figured it out and how silly of me. I added a bunch of domains to Incapsula and the one running openerp was also one of them which is casugin all ports to be blocked!!!

Nic Windley
on 4/4/13, 4:28 PM

I am glad you fixed it.

IBS
on 4/4/13, 10:29 PM

And my thanks for your help Karim.

Nic Windley
on 4/5/13, 9:23 AM

No problem at all Nic.

IBS
on 4/5/13, 4:48 PM

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

1 follower(s)

Stats

Asked: 4/4/13, 8:31 AM
Seen: 2746 times
Last updated: 3/16/15, 8:10 AM