httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Boyle Owen" <Owen.Bo...@swx.com>
Subject RE: [users@httpd] running multpiple copies of httpd simultaneously
Date Mon, 06 Sep 2004 08:37:55 GMT
> -----Original Message-----
> From: bruce [mailto:bedouglas@earthlink.net]
> 
> in trying to run multiple copies of apache simultaneously on 
> one server, i
> did a
>   httpd -k start (1st instance)
> followed by:
>   httpd -f /dir/to/diff.conf  (next instance)
> 
> doing a ps -ef appears to show two different instances of 
> httpd running..
> i changed the listen port in the 2nd to be 82.
> 
> my question..  how can i stop either one of the httpd apps by doing a
> http -stop...???

Depends if the two instances have different log directories... When it
starts, apache stores the parent PID in logs/httpd.pid. When you want to
stop it, it reads this file to get the PID of the process to kill.

The easiest way to proceed is to have two server-root directories each
containing a separate conf and logs directory, eg:

server_root_1/conf/httpd_1.conf:
server_root_1/logs

and 

server_root_2/conf/httpd_2.conf:
server_root_2/logs

the apache binary can be anywhere, you just make sure you always specify
the config file when you stop or start apache:

start 1:
httpd -f server_root_1/conf/httpd_1.conf start
(will write PID to server_root_1/logs/httpd.pid)

start 2:
httpd -f server_root_2/conf/httpd_2.conf start
(will write PID to server_root_2/logs/httpd.pid)
	
Then 

stop 1:
httpd -f server_root_1/conf/httpd_1.conf stop

stop 2:
httpd -f server_root_2/conf/httpd_1.conf stop

Alternatively, you can mess around with the PidFile, ServerRoot
directives etc.

Rgds,
Owen Boyle
Disclaimer: Any disclaimer attached to this message may be ignored. 

> 
> i'd rather be able to gracefully do a stop, as opposed to 
> killing it by
>  'kill -9 pid...'
> 
> 
> thanks..
> 
> -bruce
> 
> 
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP 
> Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 
> 
Diese E-mail ist eine private und persönliche Kommunikation. Sie hat
keinen Bezug zur Börsen- bzw. Geschäftstätigkeit der SWX Gruppe. This
e-mail is of a private and personal nature. It is not related to the
exchange or business activities of the SWX Group. Le présent e-mail est
un message privé et personnel, sans rapport avec l'activité boursière du
Groupe SWX.

This message is for the named person's use only. It may contain
confidential, proprietary or legally privileged information. No
confidentiality or privilege is waived or lost by any mistransmission.
If you receive this message in error, please notify the sender urgently
and then immediately delete the message and any copies of it from your
system. Please also immediately destroy any hardcopies of the message.
You must not, directly or indirectly, use, disclose, distribute, print,
or copy any part of this message if you are not the intended recipient.
The sender's company reserves the right to monitor all e-mail
communications through their networks. Any views expressed in this
message are those of the individual sender, except where the message
states otherwise and the sender is authorised to state them to be the
views of the sender's company. 



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message