These forums are locked and archived, but all topics have been migrated to the new forum. You can search for this topic on the new forum: Search for apache don't work on the new forum.
hi, this morning i have this message on my server:
Syntax error on line *** of /etc/httpd/conf/httpd.conf: The address or port is invalid
and in this line i have:
NameVirtualHost [85.94.198.107]:80
/////////////////////////////////////////
the lines upper are this:
NameVirtualHost 85.94.198.107:80
and the lines under are:
ServerName hotel-lampedusablue.it ServerAlias www.hotel-lampedusablue.it
Try removing the square brackets from the erroneous line. Or, if the NameVirtualHost line is actually duplicated with two times the same IP, remove the line with the IP in square brackets.
i've removed the ip in the square bracket in httpd.conf ! NOW Apache is turn on :)
There's only a problem, when i create a NEW Virtual Server in Httpd.conf ADD the line with the ip in the square bracket, so apache crash another time. :(
I've correct manually httpd.conf and apache turn on, but how i can fix the problem?
Hmm, that's an unusual issue!
What output do you receive if you run this command:
grep -i virtualhost /etc/httpd/conf/httpd.conf
grep -i virtualhost /etc/httpd/conf/httpd.conf
with a new virtual server created (so there are duplicate ip)
NameVirtualHost 85.94.198.107:80
NameVirtualHost [85.94.198.107]:80
There we go, find this line in your Apache config:
NameVirtualHost [85.94.198.107]:80
And comment it out, that's very likely the cause of the problem.
-Eric
i don't understand very well and my english it's so poor :(
NOW: in httpd.conf i've removed all the [85.94.198.107]:80
SO -> Apache is OK
all seem to be ok...but....
AFTER: I create a new virtual server
AND in httpd.conf there's [85.94.198.107]:80 !!! another time !!
Apache is KO :D
Try changing the line that has
<VirtualHost 85.94.198.107:80 [85.94.198.107]:80>
and modify it to look like the other VirtualHost lines (i.e. remove the extraneous "[85.94.198.107]:80" bit). This doesn't look right to me, since it's the only virtual host with that syntax.this is the grep with httpd modified
<VirtualHost *:80>
</VirtualHost>
<VirtualHost *:80>
</VirtualHost>
<VirtualHost *>
</VirtualHost>
NameVirtualHost 85.94.198.107:80
<VirtualHost 85.94.198.107:80>
</VirtualHost>
<VirtualHost 85.94.198.107:80>
</VirtualHost>
<VirtualHost 85.94.198.107:80>
</VirtualHost>
<VirtualHost 85.94.198.107:80>
</VirtualHost>
<VirtualHost 85.94.198.107:80>
</VirtualHost>
<VirtualHost 85.94.198.107:80>
</VirtualHost>
<VirtualHost 85.94.198.107:80>
</VirtualHost>
<VirtualHost 85.94.198.107:80>
</VirtualHost>
<VirtualHost 85.94.198.107:80>
</VirtualHost>
<VirtualHost 85.94.198.107:80>
</VirtualHost>
<VirtualHost 85.94.198.107:80>
</VirtualHost>
<VirtualHost 85.94.198.107:80>
</VirtualHost>
<VirtualHost 85.94.198.107:80>
</VirtualHost>
<VirtualHost 85.94.198.107:80>
</VirtualHost>
<VirtualHost 85.94.198.107:80>
</VirtualHost>
<VirtualHost 85.94.198.107:80>
</VirtualHost>
<VirtualHost 85.94.198.107:80>
</VirtualHost>
<VirtualHost 85.94.198.107:80>
</VirtualHost>
<VirtualHost 85.94.198.107:80>
</VirtualHost>
So does it work now? I.e. can you create a new virtual server without the erroneous line getting added?