I´ve the following error with mod_proxy and proxypass directive:
My vhost file:
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
<VirtualHost *:80>
#ForensicLog logs/debuglog
ServerName updatefw.example.com
ServerAdmin support@example.com
ErrorLog logs/updatefw-error.log
CustomLog logs/updatefw-access_log common
ProxyPass / balancer://test
ProxyPassReverse / balancer://test
<Proxy balancer://test>
BalancerMember http://10.10.20.12:80
</Proxy>
</VirtualHost>
When i browse updatefw.example.com i get a 200 from index file:
[root@10.10.20.12 updatefw.example.com]# pwd
/var/www/vhosts/updatefw.example.com
[root@10.10.20.12 updatefw.example.com]# cat index.html
OK
However when i try to browse a file in a subdirectory i get a 500 error:
http://updatefw.example.com/pepe/asdf.txt
/var/www/vhosts/updatefw.example.com/pepe
[root@10.10.20.12 pepe]# ls
asdf.txt
error log:
[Wed Apr 20 11:43:53.046606 2016] [proxy:warn] [pid 27551] [client 10.20.1.1:56553] AH01144: No protocol handler was valid for the URL /pepe/asdf.txt. If you are using a DSO version of mod_proxy, make sure the proxy submodules are included in the configuration using LoadModule.
I´ve no idea what is going wrong since i´m loading mod proxy http module. Brosing http://10.10.20.12/pepe/asdf.txt works fine
Any ideas on this?
Solved:
ProxyPass / balancer://test/
ProxyPassReverse / balancer://test/
Needed a / behind balancer name.