c# - ASP.NET CORE 3.0 Identity 在 Ubuntu 19.04 上不起作用
问题描述
我正在使用部署到 Ubuntu 19.04 的 ASP.NET Core 3.0 应用程序上的标识集。
身份区域似乎无法正常工作。当我导航到它时,它给了我一个来自 Nginx 的“未找到”。我试图弄清楚我需要改变什么来让 Nginx 允许身份区域(和其他区域)通过反向代理。当我 curl localhost:5000/Identity/Account/Register 时,我收到 HTML。
Nginx 设置:
server {
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/jl3/linux-x64/publish/;
# Add index.php to the list if you are using PHP
index index.html index.htm index.nginx-debian.html;
server_name _;
location / {
proxy_pass http://localhost:5000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection keep-alive;
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ =404;
}
location /css/ {
root /var/www/jl3/linux-x64/publish/wwwroot;
}
location /images/ {
root /var/www/jl3/linux-x64/publish/wwwroot;
}
location /js/ {
root /var/www/jl3/linux-x64/publish/wwwroot;
}
location /lib/ {
root /var/www/jl3/linux-x64/publish/wwwroot;
}
}
我是否缺少位置参考,或者我的根命令不正确?主(不是身份)页面工作正常,但对于其他一些页面,我必须包含 Hrefs 而不是使用 asp-controller 和 asp-action 帮助器标签。
解决方案
推荐阅读
- python-3.x - 阻止 x 轴标签缩小 Matplotlib 中的绘图?
- python - Python:从文件中提取备用列
- python-3.x - 锯齿状数组的 Python 等价物是什么?
- python - 将 python 输入更新为小写时遇到问题
- python - python将文件读入2维数组for循环
- python - 我可以运行多个扭曲的实例吗?
- java - 在Java中将单击的像素的颜色更改为红色?
- apache - curl: (7) 连接到 35.229.60.183:80 失败;(谷歌云上的虚拟机)连接被拒绝
- javascript - 如何确保函数在 VueJS 中执行
- c - 为什么在 GDB 中,“frame at”的值与 ebp($fp) 寄存器的值不同?