nginx 下载服务
以前用的nginx都是别人配好的,现在自己玩一玩
- 安装
点击跳转下载页面 - 确认版本以及安装位置
nginx -V
- 修改配置
编辑nginx.conf
location /static {
# 下载资源的目录
alias /Users/huihaiwang/Desktop;
index index.html;
}
- 使用方式
http请求服务器地址:端口/static/文件名称 默认端口8080 本地的话就是localhost
就会下载该资源,static在这里的意思就是路由到你配置的目录