mac下安裝Nginx
使用homebrew。
$ brew install nginx
nginx的安裝位置
$ nginx -V
查看到 –prefix=/usr/local/Cellar/nginx/1.12.1,即爲root path
nginx默認配置 ‘root html’是在哪裏
經查詢發現 root html居然是在一個www的文件夾下,不知爲何。在stackoverflow上查詢發現,即爲/usr/local/Cellar/nginx/1.12.1/html,發現這是一個軟鏈接。
/usr/local/Cellar/nginx/1.12.1/html -> ../../../var/www
所以實際上是在../../../var/www中。