nginx under Mac installation

nginx installation

homebrew download and install and can be used under the premise

In the command line input

to be directed to the brew search nginx nginx

brew install nginx for mounting nginx

(If there is an error or failure midway download, you can continue to the next and so on its own, the network may be the reason not to download is successful, he would have been placed until the download successfully)

brew services start nginx nginx started after the success of the download is complete

Booted enter localhost in the browser: 8080 will appear this interface, explained that it had successfully downloaded

 

/usr/local/etc/nginx/nginx.conf (configuration file path)

/ Usr / local / var / www (default server path)

/usr/local/Cellar/nginx/1.8.0 (installation path)

Simple Commands

nginx -s quit quit

nginx -s reload to reload

nginx -t test configuration nginx.conf

 

Guess you like

Origin www.cnblogs.com/gaifeile/p/11285642.html