Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need to run 2 apache's and tomcats--how?

Status
Not open for further replies.

Ladyoclass

IS-IT--Management
Sep 18, 2002
11
0
0
US
I currently have Apache-2.0.47 installed on Linux ES 2.1 with Tomcat 4.1.24 where apache serves the static pages and tomcat serves the secure pages when requested. This all belongs to one client. What I am having trouble figuring out is how to run another instance of the same thing... another client with a separate instance of apache and tomcat as their configurations will be different. How can I do this?

Thank you for your help in advance!
 
Each apache instance must tie to a unique IP:pORT combination. Bottom line, Apache eats its IP:pORT combo and makes it unavailable to other Apache instances that may want to run.

If you really are tied to another instance you have a few options:

1) Run an apache as a front-end proxy on, say, IP:80.
2) Based on what vhost is accessed the front-end redirects to a backend apache/tomcat instance running on, say , IP:8001.
3) For each new instance you set up you have it answer on IP:800x etc etc etc

This will allow you to run multiple instances of apache behind a single IP address which is what it sounds like you are trying to do.

Alternatively, if you have a large IP space, just instantiate a bunch of apache's across it, 1 IP per client.

I have not configured tomcat in awhile, but I believe you can configure it per virtualhost which would eliminate the need for multiple instances. Not sure there. The above technique should work fine either way.



 
Thank you so much... I will try to talk the clients into using different IP's and make life easier for everyone but I think my problem is going to be that if I just need to restart one client (vhost (IP)), that can not be done with the virtual host setup can it?
 
Correct, if you are in a vhost world a restart hits everyone.

If you have lots of RAM you can use a single front end server with multiple backend servers and then just restart the backend for that customer when the changes are made. ProxyPass/ProxyPassReverse/mod_rewrite are your friends in this scenario.

Running multiple apache instances may get expensive RAM wise, be careful!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top