Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Running two apache servers?

Running two apache servers?
Thread Tools
Fresh-Faced Recruit
Join Date: Mar 2002
Location: The Netherlands
Status: Offline
Reply With Quote
Apr 2, 2002, 07:06 PM
 
Hi all,

Is it possible to run two apache servers on one computer? I would like to use one of them for development, and the other for regular serving. If so, how does the computer know to which server it has to send http requests (using the URL).

Many Thanks,
Don
     
Dedicated MacNNer
Join Date: Jun 2000
Location: Dundas, Ontario, Canada
Status: Offline
Reply With Quote
Apr 3, 2002, 12:10 AM
 
This can be done but you will have to override Apache's install locations. This is because, once it realizes that you are running OS X, it tries to replace older copies of itself (a nice feature if you are into that sort of thing). The way it decides which server process to use is based on part bindings. The httpd.conf (I think) file has a line where you can specify port (normally 80). Just set them to use different ones and you should be fine (although you will have to start at least one of the processes from command line with apachetl).

Unless you need different server versions or different modules it would be a better idea to use virtual hosting which is where one server acts like several. Apache is great at this and it is very useful. You would have to look at the docs on Apache's site or check google for how to do this since I can't remember off the top of my head (I just remember it is damn easy and is the last thing in the conf file).

Hope that helps,
Jeff.
Spectral Class
"Shedding Light on Innovation"
     
wonco  (op)
Fresh-Faced Recruit
Join Date: Mar 2002
Location: The Netherlands
Status: Offline
Reply With Quote
Apr 3, 2002, 09:16 AM
 
Thank you. I asked this because I wanted to test a new version of Tomcat and Cocoon, for which I would need a new server instance. I wanted first to test the new versions and when succesful replace the original server with the new one. So that when it doesn't work, nothing would be lost.
The new configuration works on my iBook, but the configuration of Apache was not the same as on my server. Do you know how I can return Apache to its original state? Because then I know what I have to do.
     
Fresh-Faced Recruit
Join Date: Jan 2002
Location: Boston
Status: Offline
Reply With Quote
Apr 10, 2002, 12:02 AM
 
Have you tried Jetty? It's really a great open-source servlet engine (used by JBoss) and you don't need Apache on the front.jetty.mortbay.com. They just released 4.0 I noticed as I was verifying the URL.

My old compay used it in JBoss for a pretty high volume site. We really liked it.

Jamie
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 12:30 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2