• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1346
  • Last Modified:

Apache2 httpd.conf problem

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
confusedmoron
Asked:
confusedmoron
  • 2
  • 2
1 Solution
 
mrielfCommented:
>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
 
confusedmoronAuthor Commented:
I commented that line out and it starts fine...  It's trying to read a port number from ServerName?
0
 
periwinkleCommented:
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
 
confusedmoronAuthor Commented:
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
 
periwinkleCommented:
I don't think that it ever should have worked...
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now