[英]Deploy ASP.Net Core with Plesk for Linux
I am trying to deploy ASP.Net Core 3.0 api project to CentOS 8 server.我正在尝试将 ASP.Net Core 3.0 api 项目部署到 CentOS 8 服务器。 Is there a way to use plesk to deploy this?
有没有办法使用 plesk 来部署它? May be by providing additional settings under "Apache & nginx Settings" (or any other way)?
可能是通过在“Apache & nginx 设置”下提供其他设置(或任何其他方式)?
Tried following this article - Error using ASP.NET Core in Ubuntu with Plesk尝试按照这篇文章 - 在 Plesk 的 Ubuntu 中使用 ASP.NET 内核时出错
. .
RequestHeader set "X-Forwarded-Proto" expr=%{REQUEST_SCHEME}
SSLProxyEngine On
SSLProxyVerify none
ProxyPreserveHost On
ProxyPass / https://127.0.0.1:5001/
ProxyPassReverse / https://127.0.0.1:5001/
But getting different error.但得到不同的错误。
AH00898: Error during SSL Handshake with remote server returned by /
Any help would be highly appreciated.任何帮助将不胜感激。
Many Thanks & Regards非常感谢和问候
Finally after some detailed debugging and understanding how the flow works between Plesk, Apache, NginX and ASP.Net Core, managed to get it working.最后经过一些详细的调试和了解 Plesk、Apache、NginX 和 ASP.Net Core 之间的流程是如何工作的,设法让它工作。 Added following configuration to "Additional Apache directive" under Apache & nginx Setting.
在 Apache & nginx 设置下的“附加 Apache 指令”中添加了以下配置。
RequestHeader set "X-Forwarded-Proto" expr=%{REQUEST_SCHEME}
Protocols h2 http/1.1
SSLEngine on
SSLProtocol all -SSLv3 -TLSv1 -TLSv1.1
SSLHonorCipherOrder off
SSLCompression off
SSLSessionTickets on
SSLUseStapling off
SSLProxyEngine On
SSLProxyVerify none
ProxyPreserveHost On
ProxyPass / http://127.0.0.1:5000/
ProxyPassReverse / http://127.0.0.1:5000/
Key thing to notice is that Proxy is redirecting to http and not https.需要注意的关键是 Proxy 正在重定向到 http 而不是 https。 But that is just internal in AWS server and user end is already protected by SSL configured through Apache.
但这只是 AWS 服务器内部的,用户端已经受到通过 Apache 配置的 SSL 的保护。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.