MAMP conflict with OS X Lion Apache

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!

+7
source share
1 answer

I would see what works on port 8888. lsof can show you what works on the network port (note that this can also show outgoing traffic, so use a keen eye when checking port 80).

 sudo lsof -i :8888 

Note that lsof is usually used for a "list of open files" in a directory (hence the name). This is a little-known use of the utility.

+1
source

All Articles