apache don't work

10 posts / 0 new
Last post
#1 Fri, 02/28/2014 - 05:43
ddstaff

apache don't work

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

Fri, 02/28/2014 - 07:25
Locutus

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.

Fri, 02/28/2014 - 09:25 (Reply to #2)
ddstaff

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?

Fri, 02/28/2014 - 09:55
andreychek

Hmm, that's an unusual issue!

What output do you receive if you run this command:

grep -i virtualhost /etc/httpd/conf/httpd.conf

Fri, 02/28/2014 - 10:26 (Reply to #4)
ddstaff

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

Fri, 02/28/2014 - 11:22
andreychek

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

Fri, 02/28/2014 - 11:49 (Reply to #6)
ddstaff

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

Fri, 02/28/2014 - 11:51
Locutus

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.

Fri, 02/28/2014 - 12:00
ddstaff

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>
Fri, 02/28/2014 - 12:16
Locutus

So does it work now? I.e. can you create a new virtual server without the erroneous line getting added?

Topic locked