We have a few internal sites like sharepoint, bugzilla, an RoR server etc.The users access these sites through the URLs like, for example, abc.example.com, xyz.example.com and so on. Is it possible to configure so that instead of accessing the sites by abc.example.com and xyz.example.com, they can be accessed using URLs like example.com/abc and example.com/xyz? I thought this might be possible with reverse proxy, and have configured as below:
ProxyRequests off
ProxyPass /abc http://abc.example.com
ProxyPass /xyz http://xyz.example.com
ProxyHTMLURLMap http://abc.example.com /abc
ProxyHTMLURLMap http://xyz.example.com /xyz
ProxyHTMLExtended On
ProxyHTMLLogVerbose On
<Location /abc>
ProxyPassReverse /
ProxyHTMLEnable On
ProxyHTMLURLMap / /abc/
ProxyHTMLURLMap /abc /abc
SetOutputFilter proxy-html
SetEnv proxy_html_force
SetEnv force-proxy-request-1.0 1
SetEnv proxy-nokeepalive 1
RequestHeader unset Accept-Encoding
</Location>
<Location /xyz>
ProxyPassReverse /
ProxyHTMLEnable On
ProxyHTMLURLMap / /xyz/
ProxyHTMLURLMap /xyz /xyz
SetOutputFilter proxy-html
SetEnv proxy_html_force
SetEnv force-proxy-request-1.0 1
SetEnv proxy-nokeepalive 1
RequestHeader unset Accept-Encoding
</Location>
But no matter what, I am not able to get it working. Apache logs indicate that it is a 404 error.I assume that I am getting it wrong in the 'Location' part, as /abc and /xyz are just random names, and do not point to any locations as such.
Is there any way that I can get it working, by using URL rewriting or something? Have also tried with Nginx, with no luck. Any help would be greatly appreciated.
Thanks, Mogaroy