Page 1 of 1

Problems with Virtual Hosts on MAMP

Posted: Wed Feb 16, 2011 2:27 am
by stonefree
I am not able to use more than one virtual hosts at a time on my MAMP testing server. Here is the excerpt from the end of my httpd.conf file -

Code: Select all

NameVirtualHost *

<VirtualHost *>
ServerName edmazursf.com
DocumentRoot "/Users/stonefree/Sites/EdMazur/"
</VirtualHost>

<VirtualHost *>
ServerName cleantechms.com
DocumentRoot "/Users/stonefree/Sites/CleanTechMS/"
</VirtualHost>
and my hosts file

Code: Select all

127.0.0.1 http://www.edmazursf.com edmazursf.com
127.0.0.1 http://www.cleantechms.com cleantechms.com
The problem is that the second host, cleantechms.com will point to edmazursf.com 's site (while keeping the original URL) .But if I comment out the first host and restart MAMP, cleantechms.com will work properly

Can someone tell me what I'm doing wrong?