Start Your Server!

You are now ready to start and then test drive your Web server.

  • Test Drive Your Web Server
  • SU to root
  • Change directory to your ServerRoot [/usr/local/etc/httpd]
  • type: ./httpd to start the server
  • If there are any errors you will see the message echoed to the screen when you start httpd
  • Telnet to the localhost port 80 [telnet localhost 80]
  • type: GET / [ENTER]
  • Watch the stream of data
  • Check your process log to determine that httpd is running
  • ps -aux | egrep httpd
  • You are ready to configure your server to start httpd when it boots
  • Add the following to the end of the file /etc/rc.d/rc.local
  • #
    # Start Up the NCSA httpd
    #
    if [ -f /usr/local/etc/httpd/httpd ]; then
            /usr/local/etc/httpd/httpd
            echo "Loading httpd "
    fi
    #

    When the computer boots Linux will look for the file /usr/local/etc/httpd/httpd, and if it is found it will be run. If the file is not found the step will be skipped and the computer will continue to boot, allowing the administrator to correct the problem.

  • To KILL and RESTART the server daemon process do the following:
  • Open up a unix shell
  • Type: kill -1 'cat pidfile'
  • Where pidfile is the setting of PidFile you selected for your server
  • Example:
  • kill -1 'cat /usr/local/etc/httpd/logs/httpd.pid
  • To KILL the server daemon process and not restart it
  • Open up a unix shell
  • Type kill 'cat pidfile'
  • Try to avoid the kill -9 'cat pidfile' because only the parent will be killed not the children processes
  • Go To: [MAIN] [ACQUIRE] [PREPARE] [CONFIG][LINKS]

    Rosenfeld.1@nd.edu