Unbinding an IP address from Apache

webkar

Active Member
Mar 25, 2002
33
0
306
Hello,

I am trying to install and bind a thttpd on one of IP addresses on a server.

Therefore I need to remove one of the IP addresses from Apache. But everything I do messes up the apache.

Have someone done this in past? If so I'll appereciate if you can give me the exact changes I should do on my httpd.conf.

Regards,
Mac
 

avijit

Well-Known Member
Jul 26, 2004
116
0
166
India
In the httpd.conf the "ServerName" and the "NameVirtualHost" parameters helps to bind it to a particular IP.
 

panayot

Well-Known Member
Nov 18, 2004
127
0
166
In httpd.conf you should explicitly enumerate on what ips should apache listen:

Code:
Listen 127.0.0.1:80
Listen 111.222.111.222:80 


<IfDefine SSL>
Listen 111.222.111.222:443
</IfDefine>
Apache will not respond to ip-s that you did not list and you can bind them to thttpd
 

webkar

Active Member
Mar 25, 2002
33
0
306
Putting IP addresses results into below problem:

[Wed May 17 20:19:32 2006] [error] VirtualHost x.x.x.114:0 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results
[Wed May 17 20:19:32 2006] [error] VirtualHost x.x.x.114:0 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results
/etc/init.d/httpd: line 83: 20926 Terminated $HTTPD -DSSL
 

panayot

Well-Known Member
Nov 18, 2004
127
0
166
For NameVirtualHost I have:

NameVirtualHost 111.222.111.222:80
....
(you enumerate all the ips from the Listen directives except for 127.0.0.1)


And your virtual hosts should look like

<VirtualHost 111.222.111.222>

or if SSL:

<VirtualHost 111.222.111.222:443>

No * anywhere
 

saj

Member
Nov 6, 2004
19
0
151
Hi,

Please double check your apache configuration file. Also check whether there are any include files and if so check that files too. Once I faced this issue and on checking I found a file /usr/local/apache/conf/test.conf included in to httpd.conf which was causing the problems.

Best regards,
Saj