On May 15, 2009, at 7:43 PM, graham wrote:
Hi I'm having trouble setting up an ip-based vhost. It's something I'vedone ok in the past, but this time I just can't get it to work, and have tried so many variations on the configuration I feel I'm going in circles..This is a RH4 remotely hosted system with Apache 2.0. It was configuredwith one IP address (x.x.x.106) but the provider told me addresses x.x.x.107-110 were also available. I set up /etc/sysconfig/network-scripts/eth0:0, eth0:1, eth0:2 and eth0:3 with the respective IP addresses. ifconfig shows they are available. I can ping the host on each of the 5 IP addresses. The vanilla RH apache configuration was working. I set the default Listen config to '*:80'. I then added a vhost starting <VirtualHost x.x.x.107:80> .../usr/sbin/httpd -S shows the vhost configuration has been accepted. Buttelnetting to x.x.x.107 gives me the pages from the default apache on x.x.x.106. The 107 vhost log files have been created, but stay at zero bytes.I cannot actually access my vhost, either externally or locally.
Do you have two specific NameVirtualHost lines? NameVirtualHost x.x.x.106:80 NameVirtualHost x.x.x.107:80 Then make sure that all your <VirtualHost> match one or the other.A NameVirtualHost *:80 will blanket all addresses apache is listening on.
If I change the configuration to add an explicit: Listen x.x.x.107:80 apache refuses to restart, giving me the error: (99)Cannot assign requested address: make_sock: could not bind to address x.x.x.107:80
Did you remove the Listen *:80 line? Apache binds to the Listen directives in order. so first it binds to *:80, then it tries to bind to x.x.x.107:80 (which is already bound to apache) and fails.
Doug Bell -- Senior Developer, Plain Black Corp. [ http://plainblack.com ] all that groks is --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx