httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Borland <jborl...@calpoly.edu>
Subject [users@httpd] Virtual Host Not Working
Date Mon, 10 Feb 2014 22:24:11 GMT
My server, which is located in the Amazon cloud, was just moved to a new 
location with a new IP address.  Nothing else was changed. However, the 
Apache Virtual Host, which has worked flawlessly for several years, is 
broken.  Apache server version is: Apache/2.2.16 (Ubuntu).

I went to my DNS host and changed the names to point to the new IP 
address.  But now, when I go to the hostname in my browser I end up at 
the default site instead of the one specified for the virtual host.  
Here is my config file (httpd-vhosts.conf).

================================

NameVirtualHost 75.101.136.229

<VirtualHost 75.101.136.229>
     ServerAdmin jborland77@gmail.com
     ServerName ec2-75-101-136-229.compute-1.amazonaws.com
     DocumentRoot "/var/www"
</VirtualHost>

<Directory "/home/jim">
    Order allow,deny
    Allow from all
</Directory>

<VirtualHost 75.101.136.229>
     ServerName atascaderoband.org
     ServerAlias www.atascaderoband.org
     DocumentRoot "/home/jim/atasband"
</VirtualHost>

<VirtualHost 75.101.136.229>
     ServerName www.slocountyband.org
     ServerAlias slocountyband.org
     DocumentRoot "/home/jim/band"
</VirtualHost>

================================

When I point my browser to atascaderoband.org or slocountyband.org I end 
up at: DocumentRoot "/var/www" instead of the ones specified for the two 
virtual hosts.

What really confuses me is that Apache says the virtual hosts are okay.  
When I type the command 'apachectl -S' I get this result:

================================

# apachectl -S
VirtualHost configuration:
75.101.136.229:*       is a NameVirtualHost
    default server ec2-75-101-136-229.compute-1.amazonaws.com 
(/etc/apache2/sites-enabled/httpd-vhosts.conf:3)
    port * namevhost ec2-75-101-136-229.compute-1.amazonaws.com 
(/etc/apache2/sites-enabled/httpd-vhosts.conf:3)
    port * namevhost atascaderoband.org 
(/etc/apache2/sites-enabled/httpd-vhosts.conf:22)
    port * namevhost www.slocountyband.org 
(/etc/apache2/sites-enabled/httpd-vhosts.conf:31)
wildcard NameVirtualHosts and _default_ servers:
*:80                   is a NameVirtualHost
    default server domU-12-31-39-04-58-57.compute-1.internal 
(/etc/apache2/sites-enabled/000-default:1)
    port 80 namevhost domU-12-31-39-04-58-57.compute-1.internal 
(/etc/apache2/sites-enabled/000-default:1)

================================

Any thoughts or suggestions would be greatly appreciated.  Thank you!


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message