angular - 为什么我在使用 Nginx 设置 Angular 应用程序时得到 404
问题描述
我正在尝试使用 nginx 设置一个角度应用程序。这是我的 nginx 配置文件:
server {
listen 4300;
server_name localhost;
location / {
root /root/sultana/thumbs;
try_files $uri no-img.png;
}
location /dashboard {
root /srv/www/htdocs;
index index.html index.htm;
}
}
第一个位置仅提供图像并按预期工作。请求由 HAProxy 转发。当我导航到 /dashboardLogin 时,我得到 404。
解决方案
推荐阅读
- c# - Remove items from a list in linq that contain the whole phrase c#
- android - 无法从主要活动的 onCreate() 开始新活动
- javascript - 如何管理 PHP 父/子浏览器选项卡。暂停父,同时允许子选项卡执行。在子退出时,父选项卡具有刷新能力
- node.js - 无法在 NodeJS + ExpressJS 应用程序中发布
- ruby - 迭代嵌套哈希并就地修改值
- c++ - 一个朋友在 VS 2017 中迭代具有私有析构函数的结构的 unique_ptr 向量失败
- java - Hibernate 不创建外键约束
- asp.net - 如何对使用 ASP.NET 表单身份验证的用户进行身份验证
- visual-studio - 如何制作一个
- angular - 元素边框显示不正确