【发布时间】:2020-09-26 17:29:57
【问题描述】:
我正在尝试将 ASP.net Core 3.1 应用程序部署到安装了 apache2 的服务器。我创建了以下虚拟主机:
<IfModule mod_ssl.c>
<VirtualHost *:443>
ProxyPreserveHost On
ProxyPass / https://127.0.0.1:5001/
ProxyPassReverse / https://127.0.0.1:5001/
#ServerAdmin mail@mail.com
ServerName xx.app
ServerAlias www.xx.app
ErrorLog ${APACHE_LOG_DIR}xx-error.log
CustomLog ${APACHE_LOG_DIR}xx-access.log common
SSLCertificateFile /etc/letsencrypt/live/xx.app/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/xx.app/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
</IfModule>
当我运行应用程序(使用 dotnet .dll)时,我收到以下消息:
Hosting environment: Production
Content root path: /home/cv/web/publish
Now listening on: http://localhost:5000
Now listening on: https://localhost:5001
Application started. Press Ctrl+C to shut down.
然后当我尝试浏览应用程序时,我收到以下错误:
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.
当我查看日志时,我唯一发现的是:
AH01144: No protocol handler was valid for the URL / (scheme 'http'). If you are using a DSO version of mod_proxy, make sure the proxy submodules are included in the configuration using LoadModule.
我尝试启用 mods proxy_http、http 并没有解决问题。
提前致谢!
【问题讨论】:
标签: asp.net apache asp.net-core internal-server-error