【发布时间】:2019-09-03 13:43:57
【问题描述】:
我按照官方指南在 Ubuntu 18.04 上安装了 NET Core SDK:
https://dotnet.microsoft.com/learn/dotnet/hello-world-tutorial/install
我使用命令dotnet new razor 创建了一个C# Hello World 项目并使用dotnet publish 发布。
我在 Plesk 中配置了一个带有子域的新域。
我在 Plesk 中的Apache & nginx Settings 下配置(使用官方参考:https://docs.microsoft.com/it-it/aspnet/core/host-and-deploy/linux-apache?view=aspnetcore-2.2),示例如下:
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
在子域日志中我只能看到这个:
有人可以给我一个提示,让我找个地方解决这个错误吗?
我可以检查一下以获取有关错误的更多详细信息?
【问题讨论】:
标签: c# ubuntu-18.04 plesk