Post

Nginx Configuration

项目资料给的是nginx.exe,在Mac上运行不了,所以采用风中扉页’s Blog中的方法

  1. 首先找到homebrew安装的nginx所在的目录,通过:
    1
    
    brew info nginx
    
  2. 定位到该nginx的目录,完成以下操作:
    • 进入html文件中,将资料里面的sky文件复制进去
    • 把nginx.config配置文件替换为资料中的
    • 可以改一下端口,从
      1
      2
      3
      4
      
      server{
       listen  8088; #如果以后这个端口也被占用了可以再改
       ...
      }
      
  3. 运行nginx
    1
    
    brew services start nginx
    
  4. 访问localhost:8088即可

  5. 作者给的提示:配置文件中的8081是后端的接口,所以要修改一下idea中的端口号(因为要一一对应,修改propertie文件或者yml文件中改一下端口号就行)
This post is licensed under CC BY 4.0 by the author.