Installing nginx on Mac OSX

Install MacPorts: See InstallingMacPorts, then:

$ sudo port install nginx +ssl

Root folder is treated as /opt/local so configuration files are under /opt/local/etc/nginx, with the default website under /opt/local/share/nginx/html.

Set nginx to start during boot

$ sudo launchctl load /Library/LaunchDaemons/org.macports.nginx.plist

Disable nginx automatic startup at boot

$ sudo launchctl unload /Library/LaunchDaemons/org.macports.nginx.plist

-- Frank Dean - 10 Mar 2017

Related Topics NginxTips, InstallingMacPorts, MacOSXTips