Apache config file problem

Discussion in 'Web Design and Development' started by jin10, Oct 14, 2008.

  1. jin10 macrumors newbie

    Oct 14, 2008
    I am using :apple: tiger and I want to setup Apache for local use. I edited the config file in "/private/etc/httpd" folder and saved it.

    I removed '#' sign from following lines:
    #LoadModule php4_module
    #AddModule mod_php4.c
    #AddType application/x-httpd-php .php
    #AddType application/x-httpd-php-source .phps

    And then I went into system preferences to restart the personal web sharing for the changes to take effect. It wont start. The message says "web sharing starting up" and stays there. Nothing happens.

    I went into terminal and typed "sudo apachectl configtest" it gave me error saying "Syntax error on line 2 of /etc/httpd/httpd.conf:
    Invalid command 'oadModule', perhaps mis-spelled or defined by a module not included in the server configuration
    Can anyone help? Thanks for your time in advance.
  2. costabunny macrumors 68020


    May 15, 2008
    Weymouth, UK
    'oadModule', theres your problem - one too many hits of the delete key :p

    add the 'L' back to the beginning of the line

  3. jin10 thread starter macrumors newbie

    Oct 14, 2008
    I checked the file 'L' is not missing from anywhere.
  4. davethewave macrumors member

    Jul 30, 2007
    Trieste, Italy
    maybe in line 2 of /private/etc/httpd.conf
    somewhere the "L" is missing.
    Apachectl can't be wrong.
  5. belvdr macrumors 603

    Aug 15, 2005
    No longer logging into MR
    vi the file and find it:
    then it will take you to where oadModule is at the beginning of the line. Alternatively, use grep:
    grep oadModule <config file>
    and look for the line missing the L.

    You might also check all of the config files.
  6. belvdr macrumors 603

    Aug 15, 2005
    No longer logging into MR
    Because he already has Apache, and appears he doesn't need a database. Besides, it is a good learning experience.
  7. misterredman macrumors 6502a


    Oct 3, 2007
    Let the OP decide about that. ;-)

    Anyway you are right about the learning experience!

    To the OP: are you sure you are checking the correct httpd file for the missing "L"?

    Try looking at this one:

  8. SrWebDeveloper macrumors 68000


    Dec 7, 2007
    Alexandria, VA, USA
    Do I understand you correctly, you physically examined line 2 of /etc/httpd/httpd.conf and the L is there? Please post the first 10 lines of that file here so I can see line 2 and what's near it.

    BTW, httpd.conf is usually in a directory called conf (short for "configuration") so you might want to run the following *nix command to find all instances of httpd.conf and see if you're editing the wrong one if more than one exists:

    locate -u
    locate httpd.conf

    The first command updates the search database, it might take a few minutes to run. The second does the actual search which includes the paths of each instead of httpd.conf so you can see if there really is more than one.


Share This Page