[英]Nginx routing issue with angular 4
有人可以解決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時,它會拋出錯誤的請求502
嘗試將以下路由重定向到index.html
index index.html;
location / {
try_files $uri $uri/ /index.html;
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.