Skip to content

Instantly share code, notes, and snippets.

@randy-ran
Forked from aymanosman/nginx_auto_start.sh
Created October 9, 2021 09:48
Show Gist options
  • Save randy-ran/7344cc0220a5d12e4413f8f23088fa53 to your computer and use it in GitHub Desktop.
Save randy-ran/7344cc0220a5d12e4413f8f23088fa53 to your computer and use it in GitHub Desktop.
Nginx: Start nginx on boot on Mac
# brew install nginx
sudo ln -s /usr/local/opt/nginx/homebrew.mxcl.nginx.plist /Library/LaunchDaemons/
sudo chown root:wheel /usr/local/opt/nginx/homebrew.mxcl.nginx.plist
sudo launchctl load /Library/LaunchDaemons/homebrew.mxcl.nginx.plist
# Why do you need sudo?
# If you want nginx to be able to bind to port 80, it will need superuser privileges
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment