简体   繁体   English

Plesk Linux ASP.NET Core ERR_CONNECTION_REFUSED

[英]Plesk Linux ASP.NET Core ERR_CONNECTION_REFUSED

I set up a Basic Asp.Net Core Website on my CentOS 7 Server.我在 CentOS 7 服务器上设置了一个基本的 Asp.Net Core 网站。 If i run it with localhost:5001 everything works fine and the site opens.如果我用 localhost:5001 运行它,一切正常并且网站打开。

If i Go Over my Domain in Plesk i get a ERR_CONNECTION_REFUSED HTPP 307.如果我在 Plesk 中检查我的域,我会收到一个 ERR_CONNECTION_REFUSED HTPP 307。

Here a Screenshot这里有一个截图

I Set up The Apache Reverse Proxy for The Domain in Plesk under The Apache and Nginx Settings Page like this:我在 Apache 和 Nginx 设置页面下为 Plesk 中的域设置了 Apache 反向代理,如下所示:

ProxyPreserveHost On ProxyPass / http://127.0.0.1:5000/ ProxyPassReverse / http://127.0.0.1:5000/ ProxyPreserveHost 在 ProxyPass / http://127.0.0.1:5000/ ProxyPassReverse / http://127.0.0.1:5000/

I think something is wrong with The redirect , because on localhost it works fine.我认为重定向有问题,因为在 localhost 上它工作正常。

Can someone help me please?有人能帮助我吗?

In the Startup.cs i deleted app.UseHttpsRedirection();在 Startup.cs 中,我删除了 app.UseHttpsRedirection(); and now it works fine现在它工作正常

I shared my anwser.我分享了我的答案。 I'm using ASP .NET Core Web API on CentOS7 (VirtualBox virtual machine) and access from real machine (Windows 10 Chrome) https://stackoverflow.com/a/70344781/9347676我在 CentOS7(VirtualBox 虚拟机)上使用 ASP .NET Core Web API 并从真机(Windows 10 Chrome)访问https://stackoverflow.com/a/70344781/9347676

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM