Solution for the not restarting apache 2.0 / 2.2 error

dwm

Verified User
Joined
Dec 4, 2007
Messages
65
Location
Netherlands
There is a known problem as confirmed by John in the restarting of Apache 2.0 / 2.2 because sometime the PID of apache2 is unknown and not written to a file. I have found out that the section that John mentioned is not in the config, and he added it manually. I found out that it is also not in the apache2.0 http template. So what you need to do is simply add in the template and rewrite your configs..

cd /usr/local/directadmin/custombuild/configure/ap2/conf/extra/
pico httpd-mpm.conf_2.0

Now add directly after the first comments (so on line 7) this code:

# Note that this is the default PidFile for most MPMs.
#
<IfModule !mpm_netware_module>
PidFile "/var/run/httpd.pid"
</IfModule>

Save the file and exit your editor. After this you have to re-generate your configs:
cd /usr/local/directadmin/custombuild/
./build rewrite_confs
/etc/init.d/httpd stop
killall httpd
/etc/init.d/httpd start
Starting httpd:

/etc/init.d/restart will sometimes make problems for this situation. Tada! Works like a charm :)

ps. http://www.directadmin.com/forum/showthread.php?t=22882 is a problem which has probably something to do with it..
 
Back
Top