Simultaneous Pow & MAMP Pro Control

I just switched from using Passenger to using POW, because I did not have to start the Apache server to run rails applications on POW. But I had no luck with MAMP Pro and POW at the same time.

Is anyone lucky with MAMP Pro and POW?

+6
source share
3 answers

There is another way that I prefer. You do not need to mess with scripts or anything - really. The downside is that you have to run MAMP Pro to access your Pow applications.

First, if you have Pow installed (which you do in your case), uninstall it using curl get.pow.cx/uninstall.sh | sh curl get.pow.cx/uninstall.sh | sh . In order not to worry, all settings and applications will be saved.

Then you need to add the line to the Pow configuration file. Do echo 'export POW_DST_PORT=88' >> ~/.powconfig and then install Pow again using curl get.pow.cx | sh curl get.pow.cx | sh .

Now open MAMP Pro, go to Hosts and create a new host. It doesn’t matter what it is named for or which directory is selected (although I use "rails.dev" and the folder where my Rails applications are stored). (Also deselect the "local name resolution" selection box just in case.) Then go to the "Advanced" tab and fill this in the text box that says "Individual settings for the virtual host":

 ServerName pow ServerAlias *.dev ProxyPass / http://localhost:20559/ ProxyPassReverse / http://localhost:20559/ ProxyPreserveHost On 

This solution is obtained from Running Pow with an Apache article on the wiki 37signals github and works fine on the excellent MAMP Pro 1.9.X for Snow Leopard as well as the terrible MAMP Pro 2.0.X on Lion.

+20
source

There is a shell script if you need to switch between running Pow and Apache: https://gist.github.com/919084

And another ruby ​​script that changes the Pow listening port, so you can still run Apache on port 80: https://gist.github.com/911687

In addition, I suggest you install powder gem

+3
source

To add to the above, if you find that your local ip is now redirecting to POW rather than apache, you need to add an empty virtual host entry to catch all the traffic.

 <VirtualHost *:80> #This is blank </VirtualHost> 
0
source

Source: https://habr.com/ru/post/894710/


All Articles