I have been going around in a circle for a few days. Basically, the problem here is that the 2nd website kept defaulting to the 1st website. I'm using the IP Address based virtual host because I'm behind the firewall and because it's faster when there's problem with the Internet (like DNS, down Internet connection, etc...). The 2nd website is accessible only behind the firewall, not accessible to the public. The 1st website is accessible to the public and behind the firewall. I'm going to post the script here... I'm using hte Unix server and the machine name is chevy. I'm also wondering if creating a fake ip address is ever possible...
#/etc/hosts (Script below)
--snip--
127.0.0.1 loopback localhost # loopback (lo0) name/address
#IP Address for this Machine...
xx.xx.x.90 chevy chevy.xxxx.com
#IP Address for Websites
xx.xx.xx.90 firstwebsite.xxxx.com
xx.xx.xx.91 secondwebsite.xxxx.com
--snip--
#httpd.conf (Script below - trimmed)
--snip--
#Listen xx.xx.xx.90:80
#Listen xx.xx.xx.90:443
#Listen xx.xx.xx.91:80
#Listen xx.xx.xx.91:443
NameVirtualHost xx.xx.xx.90:80
NameVirtualHost xx.xx.xx.90:443
NameVirtualHost xx.xx.xx.91:80
NameVirtualHost xx.xx.xx.91:443
<VirtualHost xx.xx.xx.90:80>
ServerName firstwebsite.xxxx.com
DocumentRoot "/home/website/firstwebsit
e/www"
DirectoryIndex index.php
</VirtualHost>
<VirtualHost xx.xx.xx.90:443>
ServerName firstwebsite.xxxx.com
DocumentRoot "/home/website/firstwebsit
e/secure"
DirectoryIndex login_page.php
</VirtualHost>
<VirtualHost xx.xx.xx.91:80>
ServerName secondwebsite.xxxx.com
DocumentRoot "/home/website/secondwebsi
te/www"
DirectoryIndex index.php
</VirtualHost>
<VirtualHost xx.xx.xx.91:443>
ServerName secondwebsite.xxxx.com
DocumentRoot "/home/website/secondwebsi
te/secure"
DirectoryIndex login_page.php
</VirtualHost>
--snip--
#Response as result of command line "httpd -S"
--snip--
VirtualHost configuration:
xx.xx.xx.90:80 is a NameVirtualHost
default server firstwebsite.xxxx.com (/xx/httpd.conf:1264)
port 80 namevhost firstwebsite.xxxx.com (/xx/httpd.conf:1264)
xx.xx.xx.90:443 is a NameVirtualHost
default server firstwebsite.xxxx.com (/xx/httpd.conf:1299)
port 443 namevhost firstwebsite.xxxx.com (/xx/httpd.conf:1299)
xx.xx.xx.91:80 is a NameVirtualHost
default server secondwebsite.xxxx.com (/xx/httpd.conf:1351)
port 80 namevhost secondwebsite.xxxx.com (/xx/httpd.conf:1351)
xx.xx.xx.91:443 is a NameVirtualHost
default server secondwebsite.xxxx.com (/xx/httpd.conf:1386)
port 443 namevhost secondwebsite.xxxx.com (/xx/httpd.conf:1386)
--snip--
Thanks,
Scott Fletcher