ddstaff
February 28, 2014, 11:43am
1
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:
<VirtualHost 85.94.198.107:80>
ServerName hotel-lampedusablue.it
ServerAlias www.hotel-lampedusablue.it
Locutus
February 28, 2014, 1:25pm
2
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.
ddstaff
February 28, 2014, 3:25pm
3
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?
Eric
February 28, 2014, 3:55pm
4
Hmm, that’s an unusual issue!
What output do you receive if you run this command:
grep -i virtualhost /etc/httpd/conf/httpd.conf
ddstaff
February 28, 2014, 4:26pm
5
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
Eric
February 28, 2014, 5:22pm
6
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
ddstaff
February 28, 2014, 5:49pm
7
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
Locutus
February 28, 2014, 5:51pm
8
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.
ddstaff
February 28, 2014, 6:00pm
9
this is the grep with httpd modified
NameVirtualHost 85.94.198.107:80
Locutus
February 28, 2014, 6:16pm
10
So does it work now? I.e. can you create a new virtual server without the erroneous line getting added?