How do you restore Apache to its original state?

Discussion in 'Mac Help/Tips' started by mrjamin, Jul 17, 2003.

  1. mrjamin macrumors 65816


    Feb 6, 2003
    dear all,

    apache has started to play up recently; every time i attempt to restart/start it i get the following error:

    sudo apachectl graceful
    /usr/sbin/apachectl graceful: httpd not running, trying to start
    Syntax error on line 2 of /etc/httpd/httpd.conf:
    Invalid command '', perhaps mis-spelled or defined by a module not included in the server configuration
    /usr/sbin/apachectl graceful: httpd could not be started
    Line 2 is "## httpd.conf -- Apache HTTP server configuration file", the second uncommented line is "ServerRoot "/usr"" and the only mention of the troublesome "" is on the following line:

    "#LoadModule status_module libexec/httpd/"

    you see my confusion!

    I've reverted the httpd.conf file to its original state (using the httpd.conf.default AND httpd.conf.bak) but i still get the same error - any ideas? I'm thinking that just reinstalling apache would be the best bet but i have no idea how to go about it!

    to summarise: HELP!
  2. mnkeybsness macrumors 68030


    Jun 25, 2001
    Moneyapolis, Minnesota
    have you been modifying the httpd.conf file? if so, what where you changing?

    perhaps you should double and triple check all the changes that you have made.
  3. macktheknife macrumors 6502a


    Jan 24, 2002
    You could always just replace the httpd.conf file. That should do the trick. Make sure you save the old one just in case, though.
  4. mrjamin thread starter macrumors 65816


    Feb 6, 2003
    already replaced the conf file with the .default, and the .bak that was created when i installed some update - it just randomly stopped working the other day. The only changes i made to the conf file were months ago when i enabled php.

    the permissions on the file are all fine, and i've done "repair permissions".

    Basically - how do i reinstall apache? can i just follow the Unix instructions?

Share This Page