Reverse proxy issue

reverseproxy

(Matthieu Gaillet) #1

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 ?


(Markus Neuberger) #2

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?


(Jeroen Visser) #3

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


(Matthieu Gaillet) #4

Thanks @planet_jeroen, I tried too :frowning:


(Matthieu Gaillet) #5

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 :’(


(Matthieu Gaillet) #6

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


(Matthieu Gaillet) #7

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


(Markus Neuberger) #8

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…


(Jeroen Visser) #9

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


(Matthieu Gaillet) #10

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

Yep, I’m checking.

Thanks all, I’ll report back.


(Markus Neuberger) #11

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>

(Jeroen Visser) #12

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

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


(Joel Clendineng) #13

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.


(Matthieu Gaillet) #14

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


(Joel Clendineng) #15

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…