How to install nginx+php+postgres on MacOS (2020 update)

Guys, come on, it’s very easy.

The steps are as follows:

  1. make sure you’ve got HomeBrew installed https://brew.sh/
  2. install nginx brew install nginx – as simple as that!
  3. install php brew install php (should install php74 by default)
  4. install postgres brew install postgres – yes, not that hard!

Commands you should need:

  • sudo nginx -s stop – to stop nginx server
  • sudo nginx – to start nginx server
  • brew services start postgresql to start postgres (you can start/restart/stop this thing