Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Apache just stopped working!

Options
  • 18-01-2007 9:57pm
    #1
    Registered Users Posts: 1,987 ✭✭✭


    I was setting up the mod_rewrite and then it all stopped working, i changed everything back to the original settings but when i try to start appache i get this:
    Syntax error on line 159 of C:/Apache/conf/httpd.conf:
    <Directory> directive requires additional arguments
    Note the errors or messages above, and press the <ESC> key to exit. 27...
    Can't figure it out, i've checked line 159 and this is whats there(Those numbers aren't in the file there just to show line numbers here):
    159<Directory>
    160 Options FollowSymLinks
    161 AllowOverride None
    162 Order deny,allow
    167 Deny from all
    168 Satisfy all
    169</Directory>


Comments

  • Closed Accounts Posts: 7,145 ✭✭✭DonkeyStyle \o/


    Seems like it's moaning about not having any parameters within <directory>
    Like looking at other instances of it in httpd.conf, you'll usually see <directory "c:\blah\weh" /> and then the rest of the stuff.


  • Registered Users Posts: 1,987 ✭✭✭Ziycon


    Thats what i thought but i aint got a clue what to put into the brackets, i tried _default_:80 but it waint work either! Any ideas????


  • Registered Users Posts: 7,739 ✭✭✭mneylon


    Ziycon

    If you post more of your httpd.conf on pastebin (or similar) it might help to work out what the issue is.

    From the sound of things you're stil referencing mod_rewrite somewhere in it.

    Try this:
    grep rewrite httpd.conf
    
    Replace httpd.conf with the filename of your apache config file(s) depending on your setup.

    Michele


  • Registered Users Posts: 1,987 ✭✭✭Ziycon


    Heres a link to the httpd.conf file im using: http://pastebin.ca/321350


  • Registered Users Posts: 568 ✭✭✭phil


    Uh mod_rewrite? (edit: ahh just realised the OP specified that in his first post)

    As the original replier said <Directory> needs an argument.

    http://httpd.apache.org/docs/2.2/mod/core.html#directory

    Either remove the <Directory> block or maybe change the first line to read:
    <Directory "C:/Apache">
    

    Phil.


  • Advertisement
  • Registered Users Posts: 1,987 ✭✭✭Ziycon


    This the error i got when i put "C:/Apache" into the <Directory> tag:
    (OS 10048)Only one usage of each socket address (protocol/network address/port)
    is normally permitted. : make_sock: could not bind to address 0.0.0.0:80
    no listening sockets available, shutting down
    Unable to open logs
    Note the errors or messages above, and press the <ESC> key to exit. 27...


  • Registered Users Posts: 6,511 ✭✭✭daymobrew


    In my httpd.conf (on XP), I have a '/' in the section corresponding to your line 159:
    # First, we configure the "default" to be a very restrictive set of 
    # permissions.  
    #
    <Directory />
        Options FollowSymLinks
        AllowOverride None
    </Directory>
    
    The next 'Directory' section deals with the DocumentRoot directory, just like yours.


  • Registered Users Posts: 1,987 ✭✭✭Ziycon


    I got this error when i put the '/' into the directory tag!
    (OS 10048)Only one usage of each socket address (protocol/network address/port)
    is normally permitted. : make_sock: could not bind to address 0.0.0.0:80
    no listening sockets available, shutting down
    Unable to open logs
    Note the errors or messages above, and press the <ESC> key to exit. 22...


  • Registered Users Posts: 1,987 ✭✭✭Ziycon


    Sorted it out, i was caused by the port that Apache was listening on! There seems to be another program, most likely IIS listening on port 80 so i changed the port to 90 so its 'Listen 90' no and apache has started up fine! Thanks for the help!


  • Registered Users Posts: 568 ✭✭✭phil


    / is a UNIX path corresponding to the root directory.

    APR (Apache's portability library) may translate that to the right path (most probably 'C:\') on Windows, but it's best to explicitly include it. i.e. change / to "C:\"

    The reason another error was shown is because you corrected the one before.

    Have a look at TCPView for matching up open ports to processes. Although if you have IIS installed and running that's the most likely candidate.

    http://www.microsoft.com/technet/sysinternals/Networking/TcpView.mspx


  • Advertisement
Advertisement