Solved

Apache2 httpd.conf problem

Posted on 2004-10-22
1,166 Views
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 "http://mysite.com" is outside the appropriate range (i.e., 1..65535).

Even though on line 292 in httpd.conf

ServerName http://mysite.com

And above that is

Listen 80

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

    Expert Comment

    by:mrielf
    >The port number "http://mysite.com" is outside the appropriate range (i.e., 1..65535).

    The "http://mysite.com" is not regular port number i think :)


    >Even though on line 292 in httpd.conf
    >                               ServerName http://mysite.com
    >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.


    0
     

    Author Comment

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

    Accepted Solution

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

    ServerName mysite.com

    (without the http://), or:

    ServerName mysite.com:80
    0
     

    Author Comment

    by:confusedmoron
    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?
    0
     
    LVL 15

    Expert Comment

    by:periwinkle
    I don't think that it ever should have worked...
    0

    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 http://domain.com (http://domain.com) 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 (https://www.experts-exchange.com/articles/28474/The-Case-of-a-Missing-Mobile-Phone.html)". 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