I'm having some difficulty getting Virtual Hosting to work correctly. Here is the portion of my httpd.conf file that pertains to Virtual Hosting.
Here's what happens. I go to a machine on our network and use the local_ip and it pulls up the correct page. I use the localhost and it pulls up the default page. I use an external machine and use external_ip2 and it pulls up the correct page, but when I use external_ip1 I get the Apache test page instead of the index file I have in the /var/ directory. Any ideas?
Code:
NameVirtualHost *:80
#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#
#<VirtualHost *>
# ServerAdmin webmaster@dummy-host.example.com
# DocumentRoot /[URL unfurl="true"]www/docs/dummy-host.example.com[/URL]
# ServerName dummy-host.example.com
# ErrorLog logs/dummy-host.example.com-error_log
# CustomLog logs/dummy-host.example.com-access_log common
#</VirtualHost>
<VirtualHost *:80>
ServerAdmin <email>
DocumentRoot /var/[URL unfurl="true"]www/html/default[/URL]
ServerName <other>
ErrorLog logs/default-error_log
CustomLog logs/default-access_log common
</VirtualHost>
<VirtualHost <external_ip1>:80>
ServerAdmin <email>
DocumentRoot /var/[URL unfurl="true"]www/html/dir1[/URL]
ServerName <main>
ErrorLog logs/dir1-error_log
CustomLog logs/dir1-access_log common
</VirtualHost>
<VirtualHost <external_ip2>:80>
ServerAdmin <email>
DocumentRoot /var/[URL unfurl="true"]www/html/dir2[/URL]
ServerName <secondary>
ErrorLog logs/dir2-error_log
CustomLog logs/dir2-access_log common
</VirtualHost>
<VirtualHost <local_ip>:80>
ServerAdmin <email>
DocumentRoot /var/[URL unfurl="true"]www/html/local[/URL]
ServerName <internal>
ErrorLog logs/local-error_log
CustomLog logs/local-access_log common
</VirtualHost>
Here's what happens. I go to a machine on our network and use the local_ip and it pulls up the correct page. I use the localhost and it pulls up the default page. I use an external machine and use external_ip2 and it pulls up the correct page, but when I use external_ip1 I get the Apache test page instead of the index file I have in the /var/ directory. Any ideas?