I've been encountering walls with this particular for some time.

I'm trying to create multiple IP addresses on Snow Leopard to ensure that I'm able to develop with SSL certificates. I'm running XAMPP - I'm not sure if that's the issue, however i guess I'd encounter exactly the same problems, thinking about the built-in apache is switched off.

First up I investigated setting up the Insolvency practitioners on launch. I woke up an running with a brand new StartupItem that runs properly, because I'm able to ping the ip:

ping 127.0.0.2
ping 127.0.0.1

And each of them work. Now I've IP addresses, which to be sure aren't standard on OSx.

I edited the /etc/hosts file to incorporate the brand new sites too:

127.0.0.1    site1.local
127.0.0.2    site2.local

I'd already transformed the httpd.conf to make use of the httpd-vhosts.conf - because I'd a couple of sites running around the one Ip.

I've edited the vhosts file so a website appears like this:

<VirtualHost 127.0.0.1:80>
  DocumentRoot "/Users/jim/Documents/Projects/site1/web"  
  ServerName site1.local
  <Directory "/Users/jim/Documents/Projects/site1">
    Order deny,allow
    Deny from All
    Allow from 127.0.0.1
    AllowOverride All
  </Directory>
</VirtualHost>

<VirtualHost 127.0.0.1:443>
  DocumentRoot "/Users/jim/Documents/Projects/site1/web"
  ServerName site1.local
  SSLEngine On
  SSLCertificateFile "/Applications/XAMPP/etc/ssl-certs/myssl.crt"
  SSLCertificateKeyFile "/Applications/XAMPP/etc/ssl-certs/myssl.key"
  SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown
  <Directory "/Users/jim/Documents/Projects/site1">
    Order deny,allow
    Deny from All
    Allow from 127.0.0.1
    AllowOverride All
  </Directory>
</VirtualHost>

Within the above code, you are able to alter the 1's to 2's which is the setup for that second site. They are doing make use of the same certificate, and that's why they're on different IP addresses.

I additionally incorporated the NameVirtualHost information towards the top of the file:

NameVirtualHost 127.0.0.1:80
NameVirtualHost 127.0.0.2:80
NameVirtualHost 127.0.0.1:443
NameVirtualHost 127.0.0.2:443

I'm able to ping site1.local and site2.local. I'm able to use telnet ( telnet site2.local 80 ) to get involved with both sites. However in Safari I'm able to only arrive at the first site1.local - moving to site2.local provides me with either the localhost primary page (that is incorporated within the vhosts) or provides me with a Access forbidden!.

I'm usure how to proceed, any suggestions could be awesome.