背景:使用history模式,本地开发页面正常访问,部署后访问页面空白
主要在于检查服务器配置是否正确
如下为我们项目中nginx配置示意:
location /mobile-calendar {
alias /do1cloud/web/mobile-calendar;
try_files $uri $uri/ /index.html;
}
location /mobile-calendar/calendar {
alias /do1cloud/web/mobile-calendar;
try_files $uri $uri/ /index.html;
}
location /mobile-calendar/add {
alias /do1cloud/web/mobile-calendar;
try_files $uri $uri/ /index.html;
}
location /mobile-calendar/edit {
alias /do1cloud/web/mobile-calendar;
try_files $uri $uri/ /index.html;
}
location /mobile-calendar/detail {
alias /do1cloud/web/mobile-calendar;
try_files $uri $uri/ /index.html;
}
相关文章: