Re: How to restart Apache

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx 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@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



---------------------------------------------------------------------
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@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux