Getting NginX up and running on Snow Leopard with macports June 17, 2010
so you've
sudo port install nginx
and everything seemed to go swimmingly. But when you check http://localhost/ in your browser, things don't seem to work. Ugh.
Here's the quick list of what you need to do to make it actually work:- Ensure that "Personal Web Sharing" is disabled in system preferences -> sharing. this will turn off apache
- make sure you ran
sudo port load nginx
(running it twice will error but wont hurt anything) - next, you have to set up your nginx.conf -- the easiest way is to copy the example:
sudo cp /opt/local/etc/nginx/nginx.conf.example /opt/local/etc/nginx/nginx.conf
- we're still not there yet because the default example nginx.conf points to mime.types which doesn't exist. wtf? so, we have to do another move:
sudo cp /opt/local/etc/nginx/mime.types.example /opt/local/etc/nginx/mime.types
sudo launchctl unload -w /Library/LaunchDaemons/org.macports.nginx.plist
sudo launchctl unload -w /Library/LaunchDaemons/org.macports.nginx.plist