Forum Moderators: phranque
Jim
[edited by: jdMorgan at 12:38 am (utc) on Feb. 18, 2009]
NameVirtualHost #*$!.#*$!.#*$!.#*$!:80
#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any <VirtualHost> block.
#
<VirtualHost #*$!.#*$!.#*$!.#*$!:80>
ServerAdmin wencooley@example.com
DocumentRoot "C:/website/site1.com"
ServerName site1.com
ServerAlias www.site1example.com webserver.ftpexample.com
ErrorLog "logs/site1.com-error.log"
CustomLog "logs/site1.com-access.log" common
AddHandler server-parsed .shtml
Options FollowSymLinks +Includes
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
</VirtualHost>
<VirtualHost site2.bounceme.net>
ServerAdmin wencooley@example.com
DocumentRoot "C:/website/site2.com"
ServerName site2.com
ErrorLog "logs/site2.com-error.log"
CustomLog "logs/site2.com-access.log" common
AddHandler server-parsed .shtml
Options FollowSymLinks +Includes
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
</VirtualHost>
[edited by: jdMorgan at 2:07 am (utc) on Feb. 18, 2009]
[edit reason] example.com [/edit]
Try reversing the two <VirtualHost> containers, or give your first one a domain name instead of using the IP address.
The answer might be simpler, but I'm assuming that the host/servername discrepancies in your second vHost container are just accidental results of obscuring the real names for posting here. Be aware that a request will be served by the first vHost container that matches the hostname sent by the client, and that if none match, the first vHost container will be used as the "default".
Jim