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

Problems with Virtual Hosts on MAMP

Postby stonefree » Wed Feb 16, 2011 3:27 am

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 -

Syntax: [ Download ] [ Hide ]
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

Syntax: [ Download ] [ Hide ]
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?
stonefree
Forum Newbie
 
Posts: 1
Joined: Thu Jan 20, 2011 1:55 am

Return to Installation and Configuration

Who is online

Users browsing this forum: No registered users and 0 guests