The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Apache Will Not Start

Discussion in 'EasyApache' started by slittle, Mar 25, 2006.

  1. slittle

    slittle Registered

    Joined:
    Sep 8, 2004
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Ok... I'm at my wit's end here... I've got a box that has spontaneously decided to throw an error when starting apache: (apachectl start yeilds)

    /usr/sbin/apachectl: Apache 1.3 configuration directives found
    /usr/sbin/apachectl: please read /usr/share/doc/httpd-2.0.46/migration.html

    What in the world? Obviously, unless I'm missing something here... cPanel is still in the 1.3 universe.
    apachectl configtest yeilds nothing but the apachectl help screen (as if configtest was an invalid argument)

    /usr/sbin/apachectl
    seems to be a different file size than
    /usr/local/apache/bin/apachectl

    Tried symlinking to the latter.... and I get some message complaining that Apache has not been designed to serve pages while running as root.... blah blah blah... (looks like a custom WHM build message)

    I find it hard to believe that I'm the first to have this problem.. but I can't seem to find reference to it anywhere. Any ideas?
     
  2. xidica

    xidica Well-Known Member

    Joined:
    Apr 21, 2005
    Messages:
    63
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Texas
    because

    That's because cPanel has built it's own binaries for apache. They are in /usr/local/apache/bin/ ... use the apachectl there to start apache, not the local system /usr/sbin binary. If this doesn't work, run a /usr/local/apache/bin/apachectl configtest and make sure your httpd.conf is correct.
     
  3. slittle

    slittle Registered

    Joined:
    Sep 8, 2004
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Sigh....

    Sorry, should've mentioned I'm not a noob....

    The primary problem is that if I try to run apachectl start right now.... It bails out immediately and throws a message that Apache can't be run as root.... not sure if this particular msg is compiled into the binary from the regular apache code or if this is something the cPanel bunch has added.

    Thing is... I'm not TRYING to run it as root!.... I'm starting it as root, but as I understand cPanel's implementation... it's supposed to su to nobody. That's apparently not happening. This is the exact error message apachectl gives me... when I pass it ANY argument:

    Error: Apache has not been designed to serve pages while
    running as root. There are known race conditions that
    will allow any local user to read any file on the system.
    If you still desire to serve pages as root then
    add -DBIG_SECURITY_HOLE to the EXTRA_CFLAGS line in your
    src/Configuration file and rebuild the server. It is
    strongly suggested that you instead modify the User
    directive in your httpd.conf file to list a non-root
    user.
     
  4. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    xidica comments still stand. If you want to start httpd from shell you're better off using the cPanel provided shell scripts, either:

    /scripts/restartsrv_httpd

    or

    /etc/init.d/httpd startssl
     
  5. maximus_marcus

    maximus_marcus Well-Known Member

    Joined:
    Mar 9, 2006
    Messages:
    58
    Likes Received:
    0
    Trophy Points:
    6
    Hello,

    to check out any error in your configuration, please use the following command

    /usr/apache/bin/httpd -t


    Hope this helps out you!!!

    Regards,
    Marcus
    The New Phase Of Support
     
  6. dr2web

    dr2web Active Member

    Joined:
    Jan 14, 2005
    Messages:
    33
    Likes Received:
    0
    Trophy Points:
    6
    The command that you show does not work

    /usr/apache/bin/httpd -t

    It is not the proper path.. I tried /usr/sbin/httpd -t and was given an error as well.
     
  7. maximus_marcus

    maximus_marcus Well-Known Member

    Joined:
    Mar 9, 2006
    Messages:
    58
    Likes Received:
    0
    Trophy Points:
    6
    Hello,


    I am sorry on refering to the incorrect path in the earlier thread. Let me know the error that had occurred so that I can further help you out.
     
Loading...

Share This Page