The Toolkit for Online Communities
18448 Community Members, 1 member online, 2026 visitors today
Log In Register
OpenACS Home : Forums : OpenACS Q&A : Running Apache and AOLServer Together

Forum OpenACS Q&A: Running Apache and AOLServer Together

Icon of envelope Request notifications

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 apache server will be accessed by using url http://s1.com
The AOLServer will be accessed by using url http://s2.com

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.

ProxyRequests Off
<Proxy *>
    Order deny,allow
    Allow from all
ProxyPass /s1.com http://s1.com:80/
ProxyPass /s2.com http://s2.com:8080/

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?

Posted by Patrick Giagnocavo on
You are close to having it work right...

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.

Posted by Kieran O'Sullivan on
This is complete lazyness on my part but can anyone post an apache config file which does this.