Install NGINX if it's not yet installed
brew install nginxAdd NGINX launcher to system launch daemons, runnable as root
sudo cp -v /usr/local/opt/nginx/*.plist /Library/LaunchDaemons
sudo chown root:wheel /Library/LaunchDaemons/homebrew.mxcl.nginx.plistMake sure launcher is set to keep nginx alive (see the example plist)
sudo vim /Library/LaunchDaemons/homebrew.mxcl.nginx.plist
# Ensure this is in the file:
# <key>KeepAlive</key>
# <true/>Launch NGINX
sudo launchctl load /Library/LaunchDaemons/homebrew.mxcl.nginx.plist
For me worked with KeepAlive false. On Catalina 10.15.1