1. 打开终端
  2. 安装Command Line tools
xcode-select --install
  1. 安装brew命令
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  1. 安装nginx
brew install nginx
  1. 启动nginx
sudo nginx

OK, nginx就安装好了,可以在浏览器访问了,默认端口为8080,在浏览器输入 http://localhost:8080/ 就能看到nginx在本计算机搭建的服务器
Mac安装nginx配置过程
8080是nginx自带的默认网站设置的端口,
现在我们自己来创建一个网站,设置端口和映射路径

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-08-27
  • 2022-12-23
  • 2022-01-15
  • 2022-01-20
  • 2022-12-23
  • 2021-12-28
猜你喜欢
  • 2021-10-11
  • 2021-09-05
  • 2022-12-23
  • 2021-04-17
相关资源
相似解决方案