How to use apache2 reverse-proxy with virtual hosts and also redirect / to a specific home page

181 Views Asked by At

I am using apache2 to front tomcat server that is behind it (running confluence). my goal is to use virtual hosts that map to each confluence space. So, the domain omahapolkamusic.com would map to the confluence space OmahaPolkaMusic (OPM). I have proxypass and proxyreverse entries in the virtual host config files. The reverse proxy is working with no problems. Here are the proxy entries for one of the virtual hosts:

 proxypass /  http://purple.seelink.org:8090/confluence
 proxypass /  http://purple.seelink.org:8090/confluence

So far so good.... To get to the home page for the targeted space the user enters this url:

http://OmahaPolkaMusic.com/confluence/display/OPM

and the home page of the confluence space is displayed.

All is good except the fact that the user has a long url they have to remember and enter to get to the site.

I'd like the user to enter a simple URL such as omahapolkamusic.com and have it redirect to the URL above. (http://OmahaPolkaMusic.com/confluence/display/OPM). So I want to redirect this one page but the other URLS in the application will keep using the proxypass setup above.

How do I do this? Thank you.

1

There are 1 best solutions below

0
On

I figured this out. I was already using mod-proxy to pass urls to the backend server. This was working fine. I created another set of proxy statements for the one url I wanted to direct to another page. Too simple.