在Ubuntu中使用Plesk在ASP.NET Core中使用错误

问题描述 投票:1回答:1

我按照官方指南在Ubuntu 18.04上安装了NET Core SDK:

https://dotnet.microsoft.com/learn/dotnet/hello-world-tutorial/install

我用命令C#创建了一个Hello World dotnet new razor项目,并用dotnet publish发布。

我在Plesk中用子域配置了一个新域。

我在https://docs.microsoft.com/it-it/aspnet/core/host-and-deploy/linux-apache?view=aspnetcore-2.2下在Plesk中配置(使用官方参考:Apache & nginx Settings,并带有以下示例:

HTTP / HTTPS的其他指令:

ProxyPreserveHost On
ProxyPass / http://127.0.0.1:5000/
ProxyPassReverse / http://127.0.0.1:5000/
ServerName sub.mydomain.com
ServerAlias *.mydomain.com
ErrorLog ${APACHE_LOG_DIR}helloapp-error.log
CustomLog ${APACHE_LOG_DIR}helloapp-access.log common 

我将发布的项目移到子域文件夹下,并使用命令dotnet myproject.dll启动它

我收到以下输出:

Hosting environment: Production
Content root path: /var/www/vhosts/mydomain.com/sub.mydomain.com
Now listening on: http://localhost:5000
Now listening on: https://localhost:5001
Application started. Press Ctrl+C to shut down.

在浏览器中打开sub.mydomain.com,我收到以下错误:

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at [no address given] to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

Apache Server at logx.edotto.com Port 80

在子域日志中,我只能看到此内容:

enter image description here

有人可以提示我去哪里解决此错误吗?

我可以检查一些内容以接收有关该错误的更多详细信息吗?

c# ubuntu-18.04 plesk
1个回答
0
投票

首先您需要临时禁用Nginx

© www.soinside.com 2019 - 2024. All rights reserved.