nginx - NGINX 代理通行证 - 来自同一服务器的多个入口页面
问题描述
我正在使用带有代理传递的 NGINX 来充当反向代理。在后端,我们只有一台服务器。
http://localhost:5000/index.html
http://localhost:5000/default.html
我在 nginx.conf 中有以下情况
location /one/ {
root http://localhost:5000;
proxy_pass http://localhost:5000;
index index.html
}
location /two/ {
root http://localhost:5000;
proxy_pass http://localhost:5000;
index default.html
}
问题:无论我请求 locationone
还是 location two
,系统总是加载 index.html 页面。
我需要进行哪些更改才能解决此问题。