I'm trying to get a development environment setup in OS X Lion using MAMP. I've historically had MAMP setup using it's defaults, but now I need to have an environment setup with virtualhosts. To do so, I've done the following:
1) Added to the 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 simply uncommented the Include /Applications/MAMP/conf/apache/extra/httpd-vhosts.conf
line. 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 turned off personal web sharing in system preferences.
Now, with that set, I experience a redirect when I navigate to "test.com" to test.com:8888". I'm not sure where this is coming from. Then, when I go the "http://localhost", I get the "It Works!" greeting suggesting that the OS X Lion Apache server is running.
Am I missing something with this configuration? Any thoughts?
Thanks so much for your help!
I would see what's running on port 8888. lsof can show you what is running on a network port (please note this may also show outbound traffic, so use a discerning eye when checking port 80).
sudo lsof -i :8888
Note that lsof is normally used to 'list open files' in a directory (hence the name). This is a little known use for the utility.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With