【发布时间】:2016-04-27 07:07:00
【问题描述】:
这里有 config nginx 指的是http://example.com/sellers 必须从文件夹 /data/sellers 给服务器 在另一种情况下 - 文件夹 /data/customers
Nginx 配置:
server {
listen 80;
server_name localhost;
index index.html index.htm home.html;
location /sellers {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
rewrite ^/sellers/?(.*) /$1 break;
root /data/sellers;
}
location / {
root /data/customers;
}
}
一切正常,但并不完全正确:当访问服务器时,卖家以某种方式使用文件夹 /data/customers/index.html 中的 index.html 以及文件夹 /data/sellers 的所有其余部分(这是正确的) 有什么问题?为什么 nginx 使用了错误的 index.html 文件,尽管乔治亚州的所有其他地方都是正确的?
【问题讨论】:
-
我投票结束这个问题,因为它不是英文的。
-
Вам в ru.stackoverflow.com
-
对不起。我现在就翻译
-
我认为在俄罗斯社区写作。再次抱歉。