Apache VirtualHost Proxy with a Subdirectory
Sure. But be careful; a lot of web applications aren't designed well for having their URL path change. Is the application used in a sub-directory currently?
# You'll probably want this to maintain the host mapping in IIS
ProxyPreserveHost On
# Swap in the IP address or internal host name of your IIS server:
ProxyPass /subdir/ http://192.0.2.100/subdir/
Or, if you're altering the URL path, keeping in mind that a lot of applications will have problems with this, due to absolute paths for resources (CSS, javascript, images):
ProxyPass /subdir/ http://192.0.2.100/
ProxyPassReverse /subdir/ http://192.0.2.100/
the final slash on the end is NOT mandatory. I had it setup like this
ProxyPass /dir http://exmpale.com/dir/
ProxyPassReverse /dir http://exmpale.com/dir/
and the the top level worked but eveyrything in subdirs beneath the main one did not.
I changed it to this and everything worked.
Thanks for the misinformation!!!
ProxyPass /dir http://exmpale.com/dir
ProxyPassReverse /dir http://exmpale.com/dir