Reverse proxy issue

NethServer Version: 7.4
Module: Reverse Proxy

Hi,

I must have (again) mixed things up. My reverse proxy don’t work anymore. Here is the configuration :

# ProxyPass: odoo
# Description: 
ProxyPass       /odoo   http://appserver.myserver.tld:8069
ProxyPassReverse        /odoo   http://appserver.myserver.tld:8069
<Location /odoo>
</Location>

When I try to go to myserver.tld/odoo, I receive a 404 Not found. Interestingly, the adress shown in the browser is now http://myserver.tld/web, which is the root of oodo’s path (target could be ie http://appserver.myserver.tld:8069/web/database/selector)

What did I wrong ? Where should I look ? I believe it must be related to some module not loaded in apache, but which one ?

This is my output of fresh VM with only reverse proxy installed:

[root@testserver ~]# httpd -M | grep proxy
 proxy_module (shared)
 proxy_ajp_module (shared)
 proxy_balancer_module (shared)
 proxy_connect_module (shared)
 proxy_express_module (shared)
 proxy_fcgi_module (shared)
 proxy_fdpass_module (shared)
 proxy_ftp_module (shared)
 proxy_http_module (shared)
 proxy_scgi_module (shared)
 proxy_wstunnel_module (shared)

Does another reverse proxy site work? Just to check if it’s a reverse proxy or odoo issue…
Does odoo work directly without reverse proxy?

My bet will be that you need to proxy the web folder too. (as ‘web’)

Thanks @planet_jeroen, I tried too :frowning:

Thanks @mrmarkuz - I tried with another address, didn’t worked either.

 [root@cloud ~]# httpd -M | grep proxy
 proxy_module (shared)
 proxy_ajp_module (shared)
 proxy_balancer_module (shared)
 proxy_connect_module (shared)
 proxy_express_module (shared)
 proxy_fcgi_module (shared)
 proxy_fdpass_module (shared)
 proxy_ftp_module (shared)
 proxy_http_module (shared)
 proxy_scgi_module (shared)
 proxy_wstunnel_module (shared)

Same as you :cry:

I tried to remove then reinstall the module from GUI. No result either :frowning:

Odoo works perfectly.

The other test I did was against a nexctloud instance on the same server (https). Result :

https://myserver.tld.be/nextcloud : Proxy Error

The proxy server could not handle the request GET /nextcloud.
Reason: Error during SSL Handshake with remote server

Maybe check if you have added some custom templates or added some extra conf files in /etc/httpd/conf.d?
Time problem on VM? Just guessing now…

Do you have your odoo or nextcloud set to use https only, and use self-signed certs ?

1 Like

Odoo is currently in http, but indeed nextcloud in https only, currently self-signed.

Yep, I’m checking.

Thanks all, I’ll report back.

I only managed it with this /etc/httpd/conf.d/odoorproxy.conf, so http(s)://nethserver goes to odoo…

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

but this way all other apps are not working anymore…

This works with http to go to odoo and other apps on https are working too:

<VirtualHost *:80>
ProxyPass / http://127.0.0.1:8069/
ProxyPassReverse / http://127.0.0.1:8069/
</VirtualHost>
1 Like

Due to hard links I presume, maybe this is of help:

The TLDR; would be: known bug, won’t fix, good luck using rewrite.

1 Like

you already tried apache mod_rewrite? Make a conf file and test it manually. I do all my proxies manually because I havent had good luck with default options.

1 Like

Thanks Joel ! I’ll try, but I’m not sure it will fix this hard links issue ?

Well I used this with wordpress and same issues, I had to do all hardlinks, went into settings and did it. Wordpress seems to have an issue with ssl and insecure content, I also had to force ssl…its a pain but doable. Maybe same issue with drupal…