Apache config file problem

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

  1. jin10 macrumors newbie

    Joined:
    Oct 14, 2008
    #1
    Hey,
    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

    costabunny

    Joined:
    May 15, 2008
    Location:
    ~/bunny/
    #2
    '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

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

    Joined:
    Jul 30, 2007
    Location:
    Trieste, Italy
    #4
    maybe in line 2 of /private/etc/httpd.conf
    somewhere the "L" is missing.
    Apachectl can't be wrong.
    bye
    DV
     
  5. belvdr macrumors 601

    Joined:
    Aug 15, 2005
    #5
    vi the file and find it:
    Code:
    /^oadModule
    then it will take you to where oadModule is at the beginning of the line. Alternatively, use grep:
    Code:
    grep oadModule <config file>
    and look for the line missing the L.

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

    Joined:
    Aug 15, 2005
    #7
    Because he already has Apache, and appears he doesn't need a database. Besides, it is a good learning experience.
     
  7. misterredman macrumors 6502a

    misterredman

    Joined:
    Oct 3, 2007
    #8
    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:

    /etc/httpd/httpd.conf
     
  8. SrWebDeveloper macrumors 68000

    SrWebDeveloper

    Joined:
    Dec 7, 2007
    Location:
    Alexandria, VA, USA
    #9
    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.

    -jim
     

Share This Page