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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple instances of apache 2

Status
Not open for further replies.

Floof

Technical User
Apr 25, 2001
23
0
0
FR
I am trying to find a way to launch multiple
instances of apache (using different config files ...)

Is there a way to do this ?
 
There are many ways of doing this.
1) install multiple HTTP daemons (apache source programs) with different root paths at config tim.
2) [The best method] Use virtual host containers indicating seperate config options and locations of sites/ports/etc.

If you need some examples or help regarding this just leave an email address and I'll send you some help regarding this.

Rninja
 
If I am using the second way you have described to do this,
will it be possible that I use a different php.ini for each VirtualHost ?

If not, how do I manage to have httpd installed in multiple paths ?

Thanks for your previous reply.
 
Hi Floof,
this easiest way to do this is:
1) create a new .conf file (copy the old one)
2) amend the conf file to point to a diff port
3) amend PidFile to store in a new file
4) amend ScoreBoardFile to store in a new file.
5) then you can type httpd -f <your new file name>

Joel
 
I've tried this :
I have copied the full /etc/httpd tree to /etc/httpd2
I then have modified my conf file to launch httpd on
port 81 (the previou one was on port 80).
But I can't get both instances to work simultaneously
I get a &quot;connection refused by server&quot; error message.

Any idea ?
 
no floof,
no need to copy etc/httpd tree...

Apache is quite happy to run multiple instances of itself as long as you specify a different conf file. You don't need to create a new httpd executable.

If Apache is already running on port 80, doing a &quot;httpd -f {new confile}&quot; will not harm the current running apache (but see my previous posting though).

Use your original httpd with your new httpd.conf file. This should be listening on a new port with the other modfications I mentioned earlier

regards

Joel
 
Yes it worked ...

Thanx everybody ...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top