本人是小白,第一次使用nginx,把自己学习的过程分享一下,有不足的环境提意见!
安装
1.brew search nginx
2.brew install nginx
安装验证
/usr/local/etc/nginx/nginx.conf (配置文件路径)
/usr/local/var/www (服务器默认路径)
/usr/local/Cellar/nginx/1.8.0 (安装路径)
访问localhost:8080,成功说明安装好了
常用命令
nginx -V 查看版本,以及配置文件地址
nginx -v 查看版本
nginx -c filename 指定配置文件
nginx -h 帮助
重新加载配置|重启|停止|退出[nginx -s reload|reopen|stop|quit]
打开 nginx [sudo nginx]
测试配置是否有语法错误[nginx -t]
本人就是安装如上的步骤在mac 安装并通过localhost:8080 访问安装成功!


888

被折叠的 条评论
为什么被折叠?



