Using Pow Alongside MAMP Pro

Like a lot of devs these days I run a local version of the websites that I work on under version control to safeguard and streamline my development process. For a few years now I have been using MAMP Pro to handle the stack on my machine, as almost all of the work I have been doing has been php, mySQL, Apache based.

Not long after starting to use Ruby on Rails I found Pow and really liked its simplicity and ease of use. However, out of the box it doesn’t play nicely with MAMP and you will not be able to access MAMP based sites if Pow is running.

This post details how to get them working together.

Adding Pow into the mix

  • Before installing Pow you need to follow these instructions on setting up the Pow configuration so that it doesn’t take over port 80 from Apache.
  • Once that is done you can install Pow in the normal way… curl | sh from Pow installation docs
  • Pow is now installed. Note if you have already installed Pow removing it will not affect any of your settings, so don’t be afraid of losing work if you need to uninstall.

Configuring ‘Pow’ as a host on MAMP Pro

  • Open up MAMP Pro and go to Hosts.
  • Add a new host, name it Pow (name not important, nor is the disc location)
  • Click the ‘Advanced’ button and enter the following details into ‘Customized Virtual Host General Settings’
ServerName pow
  ServerAlias *.dev

  ProxyPass / http://localhost:20559/
  ProxyPassReverse / http://localhost:20559/
  ProxyPreserveHost On
  • Now hit Apply which will update your config and restart the server.
  • Once restarted you should have MAMP Pro and Pow sharing nicely.

The settings are basically directing all requests for urls that end in .dev directly to the port that Pow is listening on. Now you can use them both without having to make any further configuration changes. Just remember not to name any of your MAMP based sites with .dev at the end, because that won’t end well.