I am facing an issue with the ProxyPass on my Apache server on Ubuntu. I have configured Apache to deal with Virtual Hosts on my server. There is an application with runs on the server and uses ports 8001 8002. I need to do something like www.example.com/demo/origin to display the contents that I would see when I visit www.example.com:8000. The contents to be displayed are a host of HTML pages.
This is the section of the virtual host config that has issues
ProxyPass /demo/vader http://www.example.com:8001/
ProxyPassReverse /demo/vader http://www.example:8001/
ProxyPass /demo/skywalker http://www.example.com:8002/
ProxyPassReverse /demo/skywalker http://www.example.com:8002/
Now when I visit example.com/demo/skywalker, I see the first page of port 8002, say the login.html page.
The second should have been www.example.com/demo/skywalker/userAction.html, instead the server shows www.example.com:8000/login.html. In the error logs I see something like:
[Mon Nov 11 18:01:20 2013] [debug] mod_proxy_http.c(1850): proxy: HTTP: FILE NOT FOUND /htdocs/js/demo.72fbff3c9a97f15a4fff28e19b0de909.min.js
I do not have any folder htdocs in the system.
This is only an issue while viewing .html pages. Otherwise, no such issue occurs.
When I visit localhost:8001 it will show any and all contents without any errors or issues.
www.example.com/demo/skywalker displays a separate webpage
www.example.com/demo/origin displays a different webpage
and
www.example.com/demo/vader displays a different webpage.
I have also tried to use one more type of combination,
<Location /demo/origin/>
ProxyPass http://localhost:8000/
ProxyPassReverse http://localhost:8000/
ProxyHTMLURLMap http://localhost:8000/ /
</Location>
This fails as well.
I would greatly appreciate if anyone can help me resolve this issue.