Problems with Virtual Hosts on MAMP

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
stonefree
Forum Newbie
Posts: 1
Joined: Thu Jan 20, 2011 12:55 am

Problems with Virtual Hosts on MAMP

Post 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?
Post Reply