Mac系统安装nginx常见问题

本文指导您如何在Mac系统中使用Homebrew安装Nginx,包括权限调整、启动停止操作,并提供检查启动状态的方法。遇到问题时,给出了具体解决步骤,确保顺利运行Nginx服务。

Mac系统安装nginx常见问题

nginx的安装

brew update 
brew search nginx
brew info nginx
brew install nginx

安装过程中如果出现权限问题,请按照提示进行操作即可:

// The following directories are not writable by your user:
 /usr/local/share/man/man8

// You should change the ownership of these directories to your user:
 sudo chown -R $(whoami) /usr/local/share/man/man8
 
// And make sure that your user has write permission:
  chmod u+w /usr/local/share/man/man8

nginx的启动

sudo nginx -s stop // 停止nginx
nginx // 启动nginx
sudo nginx -s reload // 重启nginx

nginx是否启动成功

浏览器打开:http://localhost:8080/,能正常显示欢迎信息即启动成功。
nginx启动测试地址

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值