安裝
brew install nginx
啟動(dòng)
nginx
訪(fǎng)問(wèn) localhost:8080 ?出現(xiàn)nginx畫(huà)面即可.
其他命令
nginx -s reload|stop|quit
默認(rèn)部署地址
/usr/local/var/www
nginx安裝目錄
/usr/local/etc/nginx/
問(wèn)題
- nginx already installed, it's just not linked
brew link nginx
- Could not symlink share/man/man8/nginx.8
sudo chmod ug+w share/man/man8/nginx.8 ``
- 403問(wèn)題: 可能是權(quán)限問(wèn)題, 改文件夾為755
注意ngincfyix.conf中user的設(shè)置, 改成對(duì)應(yīng)的用戶(hù),一般為rootchmod -R 755 YOUR_FOLDER