you should be able to get by with the following basics:
NameVirtualHost 172.16.3.111
<VirtualHost site1.local>
ServerName site1.local
ServerAlias www.site1.local
DocumentRoot /Users/kevin/AppsDev/site1/htdocs
</VirtualHost>
<VirtualHost site2.local>
ServerName site2.local
ServerAlias www.site2.local
DocumentRoot /Users/kevin/AppsDev/site2/htdocs
</VirtualHost>
# may be helpful to provide a default container
# basically your default web root, doesn't have to be ~/Sites
<VirtualHost *>
DocumentRoot /Users/kevin/AppsDev
</VirtualHost>
# a directory container should restrict access appropriately
<Directory /Users/kevin/Appsdev>
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
your /etc/hosts file then:
172.16.3.111 site1.local
172.16.3.111 www.site1.local
172.16.3.111 site2.local
172.16.3.111 www.site1.local
a few things to watch for:
- apache's default config on mac os x includes a number of extra files (such as /etc/apache2/users/kevin.conf, may want to make sure nothing in there is interfering with your main config
- of course check for any relevant firewall/proxy issues on your LAN
- it's sometimes helpful to establish a telnet connection to see exactly what's going on
example:
$ telnet site1.local 80
Connected to 172.16.3.111.
Escape character is '^]'.
GET / HTTP/1.1
host: site1.local
this will provide the raw HTTP connection in case there's some additional information perhaps your browser is hiding.