Skip to content

Instantly share code, notes, and snippets.

@zobzn
Forked from aymanosman/nginx_auto_start.sh
Created May 1, 2022 18:36
Show Gist options
  • Save zobzn/24f5fbfc9ebbf75ba1e508c140b828ea to your computer and use it in GitHub Desktop.
Save zobzn/24f5fbfc9ebbf75ba1e508c140b828ea 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