Error starting Apache (httpd start fails)

Discussion in 'Server Operation' started by cfspence, Jan 25, 2008.

  1. cfspence

    cfspence New Member

    Advance apologies for the utter novice question.:eek:

    In attempting to fix a slow server problem, I have somehow managed to "break" Apache. It will not now start (even when the system reboots).

    Here is the error message:
    It appears that port 80 is busy and not available for listening. How do I correct this?

    Thanks in advance for your help.
  2. topdog

    topdog New Member HowtoForge Supporter

    Have you checked with netstat to see what is holding the port open ?
  3. unclecameron

    unclecameron New Member

    you could also run Top or better yet install Htop and it will show you what process is hanging, then run

    kill PID#

    then start apache
  4. falko

    falko Super Moderator ISPConfig Developer

    Which distribution are you using, and how did you install Apache? Did you do any changes to the Apache configuration?
  5. cfspence

    cfspence New Member

    Thanks. Here is (some) of the information you requested.

    I tried reading the man pages for netstat and I'm still not sure I have issued the command with the correct options - I tried several. It's still not obvious to me what is holding port 80 open. I would be happy to post some of the output if requested. There is no output (other than the column heading) if I simply issue netstat without options.

    I have not installed HTop but did try running top. It is not obvious to me that there is a process that is hanging - how could I tell?

    I installed Apache during the fc6 install (essentially following the "Installing a LAMP System with Fedora Core 6" how-to on how-to-forge). I may have may configuration changes but I don't think so (sorry to be so vague). I could post the httpd.conf file if that would be helpful. Here is the result of httpd -V:
    [root@gnlewis log]# /usr/sbin/httpd -V
    Server version: Apache/2.2.6 (Unix)
    Server built:   Sep 18 2007 11:26:13
    Server's Module Magic Number: 20051115:5
    Server loaded:  APR 1.2.7, APR-Util 1.2.8
    Compiled using: APR 1.2.7, APR-Util 1.2.8
    Architecture:   32-bit
    Server MPM:     Prefork
      threaded:     no
        forked:     yes (variable process count)
    Server compiled with....
     -D APACHE_MPM_DIR="server/mpm/prefork"
     -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
     -D HTTPD_ROOT="/etc/httpd"
     -D SUEXEC_BIN="/usr/sbin/suexec"
     -D DEFAULT_PIDLOG="logs/"
     -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
     -D DEFAULT_LOCKFILE="logs/accept.lock"
     -D DEFAULT_ERRORLOG="logs/error_log"
     -D AP_TYPES_CONFIG_FILE="conf/mime.types"
     -D SERVER_CONFIG_FILE="conf/httpd.conf"
    Thanks again for your help.
  6. topdog

    topdog New Member HowtoForge Supporter

    You can call netstat like this
    netstat -ntlp
    You can check your apache config like this
    httpd -t
    If you dont find the problem then maybe try strace to find out why apache is hanging.

Share This Page