2
我设立nginx的(1.10.2)VUE(2.1.x的),我有以下配置:VUE nginx的:路径不匹配
location/{
root /var/lib/myRepo/dist/;
index index.html;
}
这工作时,我打 'http://localhost:8080/',但当我打其他的网址,如: 'http://localhost:8080/products/home',我得到:
404未找到
我也尝试以下操作:
root /var/lib/myRepo/dist/;
location/{
try_files $uri $uri/ index.html$query_string;
}
这里有什么可能是错的,以及如何解决这个问题。
如何'try_files $ URI $ URI/index.html的$ query_string'? (加个'?') –
@潘俊杰潘俊杰感谢您的建议但没有改进,仍然是同样的问题。 – Saurabh
试试这个'try_files $ uri $ args $ uri $ args/$ uri $ uri// index.html' –