httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bradley Giesbrecht <b...@pixilla.com>
Subject Re: [users@httpd] How to restart Apache
Date Wed, 27 Aug 2008 13:13:48 GMT
Others will answer this better I'm sure and I haven't used Debian in a  
while but I would do:

$sudo ps ax | grep httpd

$sudo kill "lowest httpd process id goes here"

$sudo /etc/init.d/apache2 start


Or, since it looks like /var/run/httpd.pid contains only the pid of  
the first (lowest numbered process) httpd process you may have luck  
just creating the httpd.pid file with the lowest numbered process id  
form the ps command with proper owner/group/permissions and use your  
scripts to restart apache2.

$sudo echo "lowest httpd process id goes here" > /var/run/httpd.pid

$sudo /etc/init.d/apache2 restart


This seemed like a simple enough question for someone like me to offer  
a little help.
That said I'd be more concerned about why files are missing.


//Brad


On Aug 27, 2008, at 4:41 AM, export@hope.cz wrote:

> Is there a way how to restart Apache if pid file is missing?
> I use my own demon.It happened  that the demon deleted  /var/run/ 
> apache2.pid   file.
> Then I can not use /etc/init.d/apache2 restart
>
> but I must restart my Debian server by init 6 .
> After that the Apache starts normally.
>
> So, if the init 6 can solve the problem  ,
> is there a way how to restart Apache without restarting the  
> server( Debian box)
> Thank you for help
> L.a.
>
> ---------------------------------------------------------------------
> 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
>


---------------------------------------------------------------------
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