【发布时间】:2017-12-01 17:37:14
【问题描述】:
我对 nginx 完全陌生。我已经在 windows pc 上安装了 nginx。
我想要做的是将D:\ 中的文件列表提供给localhost:8082/list。
如果我使用以下配置:
server {
listen 8082;
location / {
root D:/;
autoindex on;
}
}
我可以在localhost:8082 上正确看到我想要的内容。但是,如果我将其更改为:
server {
listen 8082;
location /list {
root D:/;
autoindex on;
}
}
localhost:8082/list 页面出现 404 错误。
【问题讨论】:
标签: nginx nginx-location