简体   繁体   中英

Phusion Passenger Rails server - how to access from outside?

I switched from WEBrick to Phussion Passenger following this guide: http://developer.apple.com/library/mac/#featuredarticles/PhusionRails/index.html . I used PassengerPane to configure it.

Now I can access my app at myapp.local , instead of localhost:3000

However, I don't know how to access it from the outside. It used to be ip:3000

My vhost.conf file looks like this:

<VirtualHost *:80>
  ServerName myapp.local
  DocumentRoot "/Users/martin/myapp/public"
  RackEnv development
  <Directory "/Users/martin/myapp/public">
    Order allow,deny
    Allow from all
  </Directory>
</VirtualHost>

You need to add ServerAlias YOURIP :

<VirtualHost *:80>
  ServerName myapp.local
  ServerAlias YOURIP
  DocumentRoot "/Users/martin/myapp/public"
  RackEnv development
  <Directory "/Users/martin/myapp/public">
    Order allow,deny
    Allow from all
  </Directory>
</VirtualHost>

You can add as many aliases as you want (with real domain names for example).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM