Skip to content

Instantly share code, notes, and snippets.

@sajidali
Forked from SergeyMiracle/nginx_auto_start.sh
Created September 9, 2018 17:26
Show Gist options
  • Save sajidali/76b0c24a140167670fb64a8530509681 to your computer and use it in GitHub Desktop.
Save sajidali/76b0c24a140167670fb64a8530509681 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