简体   繁体   中英

Proxy error - Error during SSL Handshake (ubuntu server)

I have a web application in node.js, which is running on port 3000. I can't get it to work with the ssl certificates, I get the following:

在此处输入图像描述

/etc/apache2/domain.conf configuration is:

<VirtualHost *:443>
       
        SSLProxyEngine on
        SSLProxyVerify none
        SSLProxyCheckPeerCN off
        SSLProxyCheckPeerName off

        ProxyPreserveHost on
        ProxyPass  / https://***.es:3000/
        ProxyPassReverse   / https://***.es:3000/

        SSLEngine on
        SSLCertificateFile /certs/certificateSSL.crt
        SSLCertificateKeyFile /certs/keySSL.key
        SSLCertificateChainFile  /certs/DigiCertCA.crt

        ServerAdmin webmaster@localhost
        ServerName ***.es
        ProxyRequests Off
        ServerAlias www.***.es

     
        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>

It looks like the ssl is correct, but I can't fix the proxy error:

在此处输入图像描述

And I get the following error when I tail /var/log/apache2/error.log:

[Mon Jan 16 17:47:29.698548 2023] [proxy_http:error] [pid 22330:tid 140606592464640] [client ****:54470] AH01097: pass request body failed to *****:3000 (****.es) from **** ()

What can i do?

Thank you so much!!!

Given that you ProxyPass to something at port 3000 and it is a common setup to have some backend at this port which is not by itself https enabled you likely have your ProxyPass (and ProxyPassReverse) directive wrong. Try to use it with http://... , not https://... - the method should reflect what protocol the internal server actually speaks and not what protocol you want to use for the reverse proxy .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM