Apache2 httpd.conf problem

Posted on 2004-10-22
Last Modified: 2012-08-14
My dishwasher just blew up and the power in the whole house switched off. My webserver down stairs was running apache2 fine before. When I try to start apache2 now on the machine I get the error

Syntax error on line 292 of /usr/local/apache2/conf/httpd.conf:
The port number "" is outside the appropriate range (i.e., 1..65535).

Even though on line 292 in httpd.conf


And above that is

Listen 80

So why is it doing this?
Question by:confusedmoron
    LVL 5

    Expert Comment

    >The port number "" is outside the appropriate range (i.e., 1..65535).

    The "" is not regular port number i think :)

    >Even though on line 292 in httpd.conf
    >                               ServerName
    >And above that is
    >                               Listen 80

    Maybe something wrong hapend to your config file, edit something in it and save. If it doesn~t work try put a blank line betwen above lines.


    Author Comment

    I commented that line out and it starts fine...  It's trying to read a port number from ServerName?
    LVL 15

    Accepted Solution

    ServerName shouldn't include the http:// part, and you can specify the port there;  try either:


    (without the http://), or:


    Author Comment

    That worked. Thanks! What confused me was that it was working fine before, with the http:// part. So why would it just start complain about it now?
    LVL 15

    Expert Comment

    I don't think that it ever should have worked...

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone. Privacy Policy Terms of Use

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    In my time as an SEO for the last 2 years and in the questions I have assisted with on here I have always seen the need to redirect from non-www urls to their www versions. For instance redirecting ( to http…
    As Wikipedia explains 'robots.txt' as -- the robot exclusion standard, also known as the Robots Exclusion Protocol or robots.txt protocol, is a convention to prevent cooperating web spiders and other web robots from accessing all or part of a websit…
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    875 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now