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:

<VirtualHost 85.94.198.107:80>
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 :slight_smile:

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. :frowning:

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 :frowning:

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 :smiley:

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

NameVirtualHost 85.94.198.107:80

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