通过以下配置可以实现通过nginx进行代理把D:\share路径下的内容映射到:http://localhost:55555/share/
server {
listen 55555; #使用的端口
server_name localhost; #使用的域名
location / {
root /www/nginx; #使用资源存放的路径
index index.html; #主页的文件名
}
location /share{ #在server下新建一个location
alias D:\share;
autoindex on; #开启自动索引功能,将共享目录下的文件整合成页面
}
}
参考文章:
本文介绍如何通过Nginx配置实现本地D:share路径的内容映射至http://localhost:55555/share/,并开启自动索引功能。
3696

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



