I've dug thru a bunch of similar questions, but nothing previously
advised seems to be helping. I've managed to confirm that IP and Name
based virtual hosting can coexist together on the same server, and
that using IP's are better than domain names to avoid dns lookups,
however, I can't seem to get this to work properly.
Originally, I had about a dozen domains all set up via name based
hosting, and they all work fine. Recently, I needed to add SSL to one
of the domains and later learned you need to have a unique IP to
accomplish this. However, I cant seem to get it to work, and there
doesn't seem to be much info available on this. I updated the DNS
record to point the domain to the new IP, as well as added the NAT to
my router, however, whenever I go to the domain it simply takes me to
the default web directory of the very first virtual host in the list.
When I switched it to the top of the list, it appeared to work, but
then I realized that the original public IP all the name based vh were
using would also default to the same directory.
Any help would be very greatly appreciated.
Here's (most) my setup: (the domain I'm trying to change to IP based
and later add SSL to is the last on the list - www.fourthehardway.com)
------------------->
NameVirtualHost 192.168.1.6
<VirtualHost 192.168.1.6>
DocumentRoot /var/www/html/clubflyers/home
ServerName www.clubflyers.com
ServerAlias clubflyers.com
ScriptAlias /cgi-bin/ /var/www/cgi-bin/
CustomLog /home/www1/clubflyers.com/logs/access_log "combined"
Options ExecCGI FollowSymLinks Includes Indexes
</VirtualHost>
<VirtualHost 192.168.1.6>
DocumentRoot /home/www1/gtcmedia.com/htdocs
ServerName www.gtcmedia.com
ServerAlias gtcmedia.com
ScriptAlias /cgi-bin/ /home/www1/gtcmedia.com/cgi-bin/
CustomLog /home/www1/gtcmedia.com/logs/access_log "combined"
Options ExecCGI FollowSymLinks Includes Indexes
</VirtualHost>
<VirtualHost 192.168.1.6>
DocumentRoot /home/www1/fever3k.com/htdocs
ServerName www.fever3k.com
ServerAlias fever3k.com
ScriptAlias /cgi-bin/ /home/www1/fever3k.com/cgi-bin/
CustomLog /home/www1/fever3k.com/logs/access_log "combined"
Options ExecCGI FollowSymLinks Includes Indexes
</VirtualHost>
<VirtualHost 192.168.1.6>
DocumentRoot /home/www1/struggleinc.com/htdocs
ServerName www.struggleinc.com
ServerAlias struggleinc.com
ScriptAlias /cgi-bin/ /home/www1/struggleinc.com/cgi-bin/
CustomLog /home/www1/struggleinc.com/logs/access_log "combined"
Options ExecCGI FollowSymLinks Includes Indexes
</VirtualHost>
<VirtualHost 216.199.96.83>
DocumentRoot /home/www1/fourthehardway.com/htdocs
ServerName www.fourthehardway.com
ServerAlias fourthehardway.com
ScriptAlias /cgi-bin/ /home/www1/fourthehardway.com/cgi-bin/
CustomLog /home/www1/fourthehardway.com/logs/access_log "combined"
Options ExecCGI FollowSymLinks Includes Indexes
</VirtualHost>