Forum OpenACS Q&A: Running Apache and AOLServer Together
I want to do the following
Run two web sites off one server using two different http daemons
1 Apache listening on port 80
2 AOLServer listening on port 8080
The Names s1.com and s2.com are pointing at the same IP Address.
If apache gets a request for www.s1.com and it deals with it.
If apache gets a request for www.s2.com it says not for me and
Reads its proxy entry, which tells it go to AOLServer on port 8080
The Proxy stuff is working on apache.
Problem apache won't do this for me (I not sure if this scenario is even possible)
My entry in the apache conf file is as follows.
Why such a ridiculous set-up (Very long story)
I know about apache Virtual Hosting option but can't use it in this situation.
Can anyone help?
There are two ways to do this:
1. Have Apache use ProxyPass and ProxyPassReverse - in this case the url in the browser will show http://s2.com/index.html for example - you would have 2 virtual hosts, and only proxypass s2.com , while configuring Apache to handle the s1.com requests directly.
2. Use Redirect to redirect a user directly to http://s2.com:8080/index.html (this will show in the browser).
You absolutely need virtual hosting set up for it to work right.
If you cannot setup NameVirtualHost *:80 etc. , you will have to load the Rewrite module and then redirect or proxy based on that - which is unnecessary and more prone to failure than the simpler methods above.