Asp.net core 如何运行ASP.Net核心API+;Linux环境下的Websocket项目?
我的ASP Net核心API也在同一端口5000上运行Websocket。我在开发模式下工作正常,但如何在Linux(CentOS 7?)上运行它 我尝试了以下方法:Asp.net core 如何运行ASP.Net核心API+;Linux环境下的Websocket项目?,asp.net-core,centos,httpd.conf,Asp.net Core,Centos,Httpd.conf,我的ASP Net核心API也在同一端口5000上运行Websocket。我在开发模式下工作正常,但如何在Linux(CentOS 7?)上运行它 我尝试了以下方法: <IfModule mod_ssl.c> <VirtualHost *:443> ServerName apiws.mydomain.com ServerAlias apiws.mydomain.com DocumentRoot /var/www/html
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName apiws.mydomain.com
ServerAlias apiws.mydomain.com
DocumentRoot /var/www/html
ErrorLog /var/log/httpd/error.log
CustomLog /var/log/httpd/requests.log combined
<Location /api/>
ProxyPass http://localhost:5000/
ProxyPassReverse http://localhost:5000/
ProxyPass ws://localhost:5000/
Require all granted
</Location>
SSLCertificateFile /etc/letsencrypt/live/apiws.mydomain.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/apiws.mydomain.com/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
ServerName apiws.mydomain.com
ServerAlias apiws.mydomain.com
DocumentRoot/var/www/html
ErrorLog/var/log/httpd/error.log
CustomLog/var/log/httpd/requests.log组合
ProxyPasshttp://localhost:5000/
ProxyPassReversehttp://localhost:5000/
ProxyPass ws://localhost:5000/
要求所有授权
SSLCertificateFile/etc/letsencrypt/live/apiws.mydomain.com/fullchain.pem
SSLCertificateKeyFile/etc/letsencrypt/live/apiws.mydomain.com/privkey.pem
Include/etc/letsencrypt/options-ssl-apache.conf
如果我使用ProxyPassws://localhost:5000/。。WebSocket运行正常,但我的API引发内部服务器错误。。但是如果我注释ws://localhost:5000/WebSocket将不会运行,但我的API工作正常
如何应对