我有一个带有 Apache 的服务器作为对 Node Web 服务的请求的代理。我目前能够使用我的域名使用本地网络之外的浏览器进行连接:https://mydomain.ca
. 我相信我曾经能够使用服务器的本地 IP 地址在本地网络中使用浏览器进行连接:https://10.0.0.13
. 但是,当我现在尝试时,我收到 500 错误。我正在寻求帮助以使其再次正常工作。如果可以的话,我也可以不在本地网络上使用 SSL 并访问服务器http://10.0.0.13
。
我收到以下带有 500 错误的文本:
The proxy server could not handle the request
Reason: Error during SSL Handshake with remote server
我查看了我的 Apache 错误日志 (/var/log/apache2/error.log) 以获取更多线索,但我没有找到我认为超级有用的文本:
[Sun Nov 28 23:11:42.609115 2021] [proxy_http:error] [pid 28560:tid 140085584455424] [client 10.0.0.220:26070] AH01097: pass request body failed to 127.0.0.1:4201 (loca lhost) from 10.0.0.220 ()
[Sun Nov 28 23:11:42.769782 2021] [proxy:error] [pid 28560:tid 140085567670016] (20014)Internal error (specific information not available): [client
10.0.0.220:26071] AH 01084: pass request body failed to 127.0.0.1:4201 (localhost)
[Sun Nov 28 23:11:42.769805 2021] [proxy:error] [pid 28560:tid 140085567670016] [client 10.0.0.220:26071] AH00898: Error during SSL Handshake with remote server returne d by /
这是我的 conf 文件的样子:
mydomain.ca-le-ssl.conf
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerAdmin webmaster@localhost
ServerName mydomain.ca
ServerAlias www.mydomain.ca
ProxyPreserveHost on
SSLProxyEngine on
ProxyPass / https://localhost:4201/
ProxyPassReverse / https://localhost:4201/
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
ServerAlias mydomain.ca
SSLCertificateFile /etc/letsencrypt/live/mydomain.ca/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/mydomain.ca/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
</IfModule>
mydomain.ca.conf
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName mydomain.ca
ServerAlias www.mydomain.ca
DocumentRoot /var/www/mydomain.ca
ProxyPreserveHost on
ProxyPass / http://localhost:4201/
ProxyPassReverse / http://localhost:4201/
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
编辑 - 以下是有关 Node Web 服务的一些信息: Node Web 服务正在侦听单个端口,并且仅侦听 https 连接。