當(dāng)我們寫好anuglar2的程序發(fā)布到服務(wù)器時宋列,使用一級路由是可以正常打開的拐云,如www.soe.xin差牛,但是直接輸入二級路路由時會出現(xiàn)not found敦间,如www.soe.xin/news层宫,配置nginx
server {
set $htdocs /usr/share/nginx/html/web;
listen 80;
server_name www.soe.xin;
location / {
root $htdocs;
try_files $uri /index.html;
}
}
這樣就解決了這個問題了珊泳!