Current location - Quotes Website - Collection of slogans - A detailed tutorial on installing Nginx on mac
A detailed tutorial on installing Nginx on mac
A detailed tutorial on installing Nginx on mac

1. installation (can be installed with brew)

Sudo brew installs nginx.

2. Check nginx version

nginx -v

Start nginx

sudo nginx

You can also use the following command to start, but it is not effective to use this command after modifying the configuration file nginx.conf, so it is not recommended:

Sudo brew service starts nginx.

picture

4. Check whether nginx started successfully.

Access/make/install/host/install in the browser). "

Commonly used instructions are:

Nginx-s reload configuration Nginx-s reopen restart nginx-s stop stop nginx-s exit nginx-v view version and configuration file address nginx-V view version nginx-c file name specify configuration file nginx-h Help.