MAMP PRO and Mountain Lion

Just a short instruction to fix the problem of MAMP PRO not willing to start the Apache services when you have pimped your OS to the latest version called "Mountain Lion".

Open up MAMP PRO and go the the "Server" tab. Then select the "General" tab and check if the Apache port is "8888". It was set to "80" here which caused Apache not being able to run.

I guess lots of other people will have this issue as well after they've upgraded to Mountain Lion so be sure to share this with those in need.

Update: Turns out the Apache wouldn't start when on port 80 because the built in OSX Apache was already running. Since "Web Sharing" has been removed from the Settings pane, you can't disable it.

Source for the update

Option 1: follow the above instructions and adjust the port to 8888 instead of 80.
Option 2: leave the port set to 80 and manually stop the default Apache by running the following command in Terminal sudo apachectl stop

Update 2: I found a new way to fix this problem which is probably better than the previous solutions above:

1. Bind Apache to port 8080
2. Forward all port 80 traffic to port 8080
3. Edit the MAMP Apache template

The first step shouldn't be too hard, just edit this port in MAMP at the Server tab.

The second step requires you to run the following command in Terminal:
sudo ipfw add 100 fwd 127.0.0.1,8080 tcp from any to any 80 in

The third and last step is to edit the Apache template file from MAMP (MAMP Pro > File > Edit Template > Apache httpd.conf).
It would be wise to create a copy of this file first as a backup before you edit the following lines:

NameVirtualHost *:MAMP_Port_MAMP becomes NameVirtualHost *
<VirtualHost _default_:MAMP_Port_MAMP> becomes <VirtualHost _default_:*>
<VirtualHost *:MAMP_VirtualHost_Port_MAMP> becomes <VirtualHost *:*>

I came across this solution because I wanted to leave the port number out of the URL (e.g. domain.dev:8888). For example, WordPress won't let you use multi lang when there's a port number.

Source for update 2