Installing nginx server for MAC (MacOS Catalina tutorial)

If you want to keep things simple and quickly run a simple web server on your mac machine, nginx is a perfect solution.

The whole installation is so easy you won’t believe.

Recipe:

  1. install Homebrew
  2. open up your terminal and use brew install nginx

That’s it 🥳

Configuring nginx

  • to have nginx start when turning on your computer, use brew services start nginx and it will have your Mac start nginx at startup.
    There are other commands you could use:
    • brew services stop nginx
    • brew services start nginx
    • brew services restartstart nginx
  • if you want to start nginx on demand, just use sudo nginx. In order to stop or restart use:
    • sudo nginx -s stop
    • sudo nginx -s restart

Sources:

Credits:

Leave a comment

Your email address will not be published. Required fields are marked *