I am trying to set up a development environment in OS X Lion using MAMP. I have historically installed MAMP using it by default, but now I need to configure the environment using virtualhosts. To do this, I did the following:
1) Added to hosts file:
127.0.0.1 test.com 127.0.0.1 my.test.com
2) Edited httpd.conf and httpd-vhosts.conf (both located in the MAMP folder). For httpd.conf, I just uncommented the line Include /Applications/MAMP/conf/apache/extra/httpd-vhosts.conf . For httpd-vhosts.conf, I added:
NameVirtualHost *:80 <VirtualHost *:80> DocumentRoot "/Users/username/Sites/test.com" ServerName test.com </VirtualHost> <VirtualHost *:80> DocumentRoot "/Users/username/Sites/my.test.com" ServerName my.test.com </VirtualHost>
3) I changed the ports in MAMP to 80 for Apache and 3306 for MySQL.
4) I disabled personal web access in the system settings.
Now, with this set, I am experiencing a redirect when switching from "test.com" to test.com:8888 "I am not sure where this comes from. Then, when I go to" http: // localhost ", I get a greeting" This working! ", assuming the OS X Lion Apache server is running.
Am I missing something with this configuration? Any thoughts?
Many thanks for your help!
tollmanz
source share