MacOS 安装 nginx

brew install nginx

 开机启动

$ sudo cp `brew --prefix nginx`/homebrew.mxcl.nginx.plist /Library/LaunchDaemons/
$ sudo sed -i -e 's/`whoami`/root/g' `brew --prefix nginx`/homebrew.mxcl.nginx.plist

 error log

sudo mkdir /var/log/nginx/nginx.conf: error_log  /var/log/nginx/error.log;)

 

Config file directory:

/usr/local/etc/nginx/nginx.conf
/usr/local/etc/php/5.4/php.ini
/usr/local/etc/nginx/fastcgi_params

 common commands

nginx -s stop ;stop
nginx ;start
ngin -s reload ;reload conf file

 

参考 

posted on   小浪鼓  阅读(2534)  评论(0编辑  收藏  举报

< 2025年4月 >
30 31 1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 1 2 3
4 5 6 7 8 9 10

导航

统计

点击右上角即可分享
微信分享提示