1. Brew Search Nginx
2. Brew Install Nginx
Start Nginx, sudo nginx; visit localhost:8080 found the Welcome page of Nginx has appeared.
Remark: Ln-s/usr/local/sbin/nginx/usr/bin/nginx make a soft connection.
The commonly used directives are:
Nginx-v view version, and profile address
Nginx-v View Version
NGINX-C filename designation configuration file
Nginx-h Help
#重新加载配置 | restart | stop | exit nginx
Nginx-s Reload|reopen|stop|quit
#打开 Nginx
sudo nginx
#测试配置是否有语法错误
Nginx-t
Also attach the Mac install Brew command:
The installation commands are as follows:
CURL-LSSF Http://github.com/mxcl/homebrew/tarball/master | sudo tar xvz-c/usr/local--strip 1
When the brew installation is successful, you can install the software you want, such as wget, as follows:
sudo brew install wget
If you uninstall, the command is as follows:
sudo brew uninstall wget
To view the installation software, the command is as follows:
sudo brew search/apache*/
Note that/apache*/is used for regular expressions, used/split.
Mac installation Nginx