有人可以解决Nginx路由问题 我的conf文件有以下位置部分
location /pages {
alias /path/to/dist/folder
index index.html;
}
当我点击http://example.com/pages时,我按照角度4路由获取http:example.com/pages/home页面,但是当我直接点击http:example.com/pages/home -its throw bad请求502
答案 0 :(得分:2)
Try the following redirection of routes to the index.html
index index.html;
location / {
try_files $uri $uri/ /index.html;
}