LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-30-2014, 09:46 AM   #1
seamore
Member
 
Registered: Sep 2009
Posts: 83

Rep: Reputation: 1
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
 
Old 07-30-2014, 11:19 AM   #2
Spatior
Member
 
Registered: Jun 2009
Location: México
Distribution: Suse, Debian based, CentOs
Posts: 48

Rep: Reputation: 10
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache start at boot ieduarte73 SUSE / openSUSE 1 08-17-2006 10:15 AM
How To Boot Tomcat After Apache maxhugen Linux - General 6 12-04-2005 08:16 PM
starting apache at boot berrance Linux - Software 3 11-01-2004 03:36 AM
Apache 2 w/ SSL Boot jqcaducifer Linux - Software 1 08-15-2003 01:42 PM
Script for Apache on Boot boyinfrance Linux - Newbie 5 06-16-2002 06:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:09 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration