This is a fancy new guide for setting up nginx with Passenger support on Mac OS X. You can refer to the first edition here if you like.
Note that I'm not sure how to get nginx running on port 80, and I'm not bothered enough to figure it out at the moment. Please leave a helpful comment for others if you take the time, though!
- Install Ruby Version Manager (optional)
- Install Homebrew
- Install Passenger
gem install passenger
- Install nginx with Passenger support
brew install nginx --with-passenger
- Follow the instructions (Caveats) that Homebrew prints out
- Open your nginx conf file
- Replace the contents of the file with this:
- ...then replace the passenger_root config option with your passenger root directory
- ...then replace the passenger_ruby with your ruby location
- ...then replace and/or create new server blocks as necessary for your apps
- Restart nginx
kill -HUP `cat /usr/local/var/run/nginx.pid`
- Add your apps to your hosts file
mate /etc/hosts For example...
- Visit one of your apps to make sure it's working:
« Home page