宝塔部署前端项目,刷新404 在nginx服务器配置文件中配置: location / { try_files $uri $uri/ @router; index index.html; } location @router { rewrite ^.*$ /index.html last; }