Skip to content

Instantly share code, notes, and snippets.

@SergeyMiracle
Forked from aymanosman/nginx_auto_start.sh
Created January 13, 2017 04:42
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save SergeyMiracle/17753a17531a1f38015364fad159587b to your computer and use it in GitHub Desktop.
Save SergeyMiracle/17753a17531a1f38015364fad159587b 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