Running Pow & MAMP Pro Simultaneously

南笙酒味 提交于 2019-12-02 16:53:36

There is another way that I prefer. You don't have to mess with scripts or anything —much. The downside is, you need to have MAMP Pro running to access your Pow apps.

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

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

Now, open MAMP Pro, go to Hosts, and create a new host. Doesn't matter what it is named and which directory is selected (though I use 'rails.dev' and the folder I keep my Rails apps in). (Also, deselect the select box for "local name resolution", just in case.) Then go to the Advanced tab, and fill this in to the textarea labeled "Customized virtual host general settings":

ServerName pow
ServerAlias *.dev

ProxyPass / http://localhost:20559/
ProxyPassReverse / http://localhost:20559/
ProxyPreserveHost On

This is a solution derived from the Running Pow with Apache article on 37signals' github wiki, and it works fine on the great MAMP Pro 1.9.X for Snow Leopard as well as the dreadful MAMP Pro 2.0.X on Lion.

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

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

Also, I would suggest you to install powder gem

Just to add to the above if you find that your local ip is now forwarding to POW rather than apache, you need to add a blank virtualhost entry to catch all traffic.

<VirtualHost *:80>
 #This is blank
</VirtualHost>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!