Welcome to WebmasterWorld Guest from

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

Multiple instances on same machine?

I'm confused, how do I have many instances on one machine

1:40 am on May 21, 2005 (gmt 0)

New User

10+ Year Member

joined:Feb 26, 2005
votes: 0

I have no idea how to have multiple instances of apache running on a single physical machine. I tried installing another copy of apache with a different directory name, but when I use "./apachectl start" it loads the wrong httpd.conf file. Is there some configuration option that I am missing?
7:08 pm on May 21, 2005 (gmt 0)

Preferred Member

10+ Year Member

joined:Mar 1, 2005
votes: 0

A better question would be "why do you want to do this?" If all you need to do is host multiple websites, this can be done with <VirtualHost> [httpd.apache.org] containers.

If you actually need to run multiple instances on the same physical machine, you can point apache at an alternate configuration file with the '-f' flag. Read the httpd(8) man page, or run '/path/to/httpd -?' for list of all commandline options.

Be aware that if you want to run multiple instance of apache on the same host *and* want all of them to run on port 80 (the default http port), you'll need to have a IP address configured for each instance on the box (and configure each apache instance to Listen [httpd.apache.org] on the proper IP address.

9:21 pm on May 21, 2005 (gmt 0)

Senior Member

WebmasterWorld Senior Member wheel is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Feb 11, 2003
votes: 11

I can't imagine why you would want to do that.

Run one copy of apache, you should be able to do whatever you want that is IP or domain specific through the overall config file.

Apache will run multiple copies of itself automatically, opening more as you get more traffic, and killing off old copies as they fall dormant. There are settings in the config files for this, but it basically happens automatically.

Each individual copy of apache then will know what to do with each domain or IP (based on the request from the client) because of what you've set up in the config file.

In short, one copy of apache should be able to handle different domains on different IP's etc. (web hosting companies with hundreds and thousands of client websites running on one computer only run one copy of apache).



7:23 am on June 23, 2005 (gmt 0)

Inactive Member
Account Expired


I'd like to run multiple instances, one per interface. I have DSL and cable WAN and would like to segregate my low bandwidth websites onto the DSL WAN and the higher bandwidth websites onto the cable WAN (at my location, cable is much fatter than DSL).

I've been advised to recompile Apache 2 in order to run multiple instances and/or move to the 2.6 kernel tree and run "virtual" servers. But I'm not sure which way to go or if there are other alternatives (I'd rather not build another server box :)

Thanks for any suggestions and help!