LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   No Apache at boot (https://www.linuxquestions.org/questions/linux-server-73/no-apache-at-boot-4175512746/)

seamore 07-30-2014 09:46 AM

No Apache at boot
 
Apache not starting up at boot.

I have Slackware 14.1 and can't get Apache to start on boot by itself. rc.httpd if run from the command Apache will start it up.

Permissions:

-rwxr-xr-x 1 root root 859 Jul 30 07:19 rc.httpd


rc.httpd code:


#!/bin/sh
#
# /etc/rc.d/rc.httpd
#
# Start/stop/restart/graceful[ly restart]/graceful[ly]-stop
# the Apache (httpd) web server.
#
# To make Apache start automatically at boot, make this
# file executable: chmod 755 /etc/rc.d/rc.httpd
#
# For information on these options, "man apachectl".

case "$1" in
'start')
/usr/local/apache2/bin/apachectl -k start
;;
'stop')
/usr/local/apache2/bin/apachectl -k stop
killall httpd
rm -f /var/run/httpd/*.pid
;;
'restart')
/usr/local/apache2/bin/apachectl -k restart
;;
'graceful')
/usr/local/apache2/bin/apachectl -k graceful
;;
'graceful-stop')
/usr/local/apache2/bin/apachectl -k graceful-stop
;;
*)
echo "Usage: $0 {start|stop|restart|graceful|graceful-stop}"
;;
esac

exit 0

Spatior 07-30-2014 11:19 AM

Hi seamore,

There are quite a few things that affect a start up script, I see that you are using absoluthe paths so probably no $PATH dependeicies there.

But you may try some of the following:

1. Check that the networks is alredy up (link and address) before the apache script is invoked, I'm not sure if Slack 14 still looks for the S scripots on /etc/init.d/rc[X] dirs
2. If you are using NameD this must be up as well since apache may be trying to resolve a domain name
3. look at apache error logs, usally in /var/log/httpd or if you compiled from source in the target dir or the dir you specified on the configuration, here you will find the message that apache throws when (and if) it tries to start

HTH


All times are GMT -5. The time now is 11:44 PM.