httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rod rook <rod.r...@gmail.com>
Subject [users@httpd] Looking for an easier way to see if Apache is running.
Date Wed, 16 Feb 2005 04:48:29 GMT
Hello.
I've successfully installed an Apache2 server on my comp with Madrake 10.0.
The only problem I have is my inability to know if it is started on boot as it 
is supposed to. The starting script is /etc/rc.d/init.d/httpd (as shown 
below). 

On boot, 'netstat -a' does not list the word, httpd. 
The Madrake Control Center (System -> services) shows httpd to be stopped 
although marked to start on boot. 

If I issue the command, apachectl start, I get a response like "httpd (pid 
1906) already running.."

Is there any easy way to tell if the server is running at the given moment? 
Why does the Control Center say it is stopped? Should I change the script in 
some way? I borrowed the script from someone on this mailing list and I am 
not sure if it is suitable for Mandrake 10.0.  
Thanks for your help in advance.

r
============================  starting on boot script ================
#!/bin/sh
#
# Startup script for the Apache Web Server
#
# from: apache-httpd-users mailinglist, 09/21/2004
#
# chkconfig: 345 85 15
# description: Apache is a World Wide Web server.  It is used to serve \
#              HTML files and CGI.
# processname: httpd



# Source function library.
. /etc/rc.d/init.d/functions 

# See how we were called.
case "$1" in
   start)
         echo -n "Starting httpd: "
         /usr/local/apache2/bin/apachectl start
         echo
         ;;
   stop)
         echo -n "Shutting down http: "
         /usr/local/apache2/bin/apachectl stop
         echo
         ;;
   status)
         status httpd
         ;;
   restart)
         $0 stop
         $0 start
         ;;
   reload)
         echo -n "Reloading httpd: "
         /usr/local/apache2/bin/apachectl restart
         echo
         ;;
   *)
         echo "Usage: $0 {start|stop|restart|reload|status}"
         exit 1
esac

exit 0



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