我正在尝试将任何缺少文件扩展名的请求定向到我的快速服务器,除了我想转到我的连接服务器的/
and之外。应该从连接服务器请求。这是我所拥有的:/dashboard
/dashboard
/dashboard.html
server {
listen 80;
server_name myserver;
index index.html;
location @connect {
proxy_pass http://localhost:9001;
}
location @express {
proxy_pass http://localhost:9002;
}
location ~* \.(html|js|css|png|jpg|jpeg|gif|ico)$ {
try_files $uri @connect;
expires 7d;
}
location = / {
try_files $uri @connect;
}
location = /dashboard {
try_files $uri.html @connect;
}
location / {
try_files $uri @express;
}
}
/
按预期进入连接服务器,但/dashboard
进入我的快速服务器。谁能帮我理解我做错了什么?