I’m trying to follow this tut http://net.tutsplus.com/tutorials/php/basecamp-style-subdomains-with-codeigniter/ to get subdomains working locally.
I’ve added this to the /etc/hosts file
127.0.0.1 snapgiftapp.com
127.0.0.1 test1.snapgiftapp.com
127.0.0.1 test2.snapgiftapp.com
and i’ve added this to the end of the /Applications/MAMP/conf/apache/httpd.config file
<VirtualHost *:80>
DocumentRoot "/Users/tomcaflisch/Sites/snapGiftAppFront"
ServerName snapgiftapp.com
ServerAlias snapgiftapp.com
<Directory "/Users/tomcaflisch/Sites/snapGiftAppFront">
Options -Indexes
Options FollowSymLinks
AllowOverride All
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "/Users/tomcaflisch/Sites/snapGiftApp"
ServerName snapgiftapp.com
ServerAlias *.snapgiftapp.com
<Directory "/Users/tomcaflisch/Sites/snapGiftApp">
Options -Indexes
Options FollowSymLinks
AllowOverride All
</Directory>
</VirtualHost>
When I point my browser to snapgiftapp.com or test1.snapgiftapp.com, I get the same site located in the snapGiftAppFront folder
I had to go into the mamp configurations and change the port to 80 instead of 8888.