pagaille
(Matthieu Gaillet)
December 7, 2017, 9:52pm
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 ?
mrmarkuz
(Markus Neuberger)
December 7, 2017, 10:04pm
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?
My bet will be that you need to proxy the web folder too. (as ‘web’)
pagaille
(Matthieu Gaillet)
December 7, 2017, 10:07pm
4
Thanks @planet_jeroen , I tried too
pagaille
(Matthieu Gaillet)
December 7, 2017, 10:10pm
5
mrmarkuz:
httpd -M | grep proxy
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
pagaille
(Matthieu Gaillet)
December 7, 2017, 10:11pm
6
I tried to remove then reinstall the module from GUI. No result either
pagaille
(Matthieu Gaillet)
December 7, 2017, 10:13pm
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
mrmarkuz
(Markus Neuberger)
December 7, 2017, 10:14pm
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…
Do you have your odoo or nextcloud set to use https only, and use self-signed certs ?
1 Like
pagaille
(Matthieu Gaillet)
December 7, 2017, 10:18pm
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.
mrmarkuz
(Markus Neuberger)
December 8, 2017, 2:39am
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>
1 Like
Due to hard links I presume, maybe this is of help:
Hi,
I am currently building and customizing a v7 instance for a client. Their server hosts various applications, e.g. mail, webdav and OpenERP.
The reverse proxy (Apache2) is working in general. When we enter https://external/erp hit...
The TLDR; would be: known bug, won’t fix, good luck using rewrite.
1 Like
Jclendineng
(Joel Clendineng)
December 8, 2017, 10:17pm
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.
You will need putty or another ssh program, or winscp, which is a ssh file manager.
Put this into your sites-available in drupal.YOUR_DOMAIN.com.conf file
Internal IP is just the IP address on your network (preferably static) drupal is on.
Summary <VirtualHost *:80>
RewriteEngine on
RewriteCond %{HTTPS} !on
RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [R=301]
ProxyPreserveHost On
ServerName drupal.YOUR_GATEWAY.com
ProxyPass / http://INTERNAL_IP/
ProxyPassReverse …
1 Like
pagaille
(Matthieu Gaillet)
December 12, 2017, 9:08pm
14
Thanks Joel ! I’ll try, but I’m not sure it will fix this hard links issue ?
Jclendineng
(Joel Clendineng)
December 13, 2017, 5:54pm
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…