Running Pow & MAMP Pro Simultaneously

前端 未结 3 1636
死守一世寂寞
死守一世寂寞 2021-01-31 06:45

I just switched from using Passenger to using POW because I didn\'t have to run the Apache server to run rails apps on POW. But I\'m not having luck running MAMP Pro and POW sim

3条回答
  •  不思量自难忘°
    2021-01-31 07:19

    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.

提交回复
热议问题