Have you tried browsing to https://nodejs.mydomain.com/demo/index.html The 
proxy configuration in Apache will direct the connection to nodejs over port 
8000.

Darryl Baker, GSEC, GCLD  (he/him/his)
Sr. System Administrator
Distributed Application Platform Services
Northwestern University
4th Floor
2020 Ridge Avenue
Evanston, IL  60208-0801
darryl.ba...@northwestern.edu<mailto:darryl.ba...@northwestern.edu>
(847) 467-6674<tel:+18474676674>

From: Kaushal Shriyan <kaushalshri...@gmail.com>
Reply-To: Apache httpd Users <users@httpd.apache.org>
Date: Wednesday, June 21, 2023 at 11:58 AM
To: Apache httpd Users <users@httpd.apache.org>
Subject: [users@httpd] node.js application listening on port 8000 enabled with 
SSL certificate returns ERR_SSL_PROTOCOL_ERROR on browser.

Hi,

I am running node.js application on port 8000 and Apache HTTP server on CentOS 
Linux release 7.9.2009 (Core)

# node --version
v16.20.0
# httpd -v
Server version: Apache/2.4.57 (IUS)
Server built:   Apr  7 2023 14:49:47
#

httpd.conf file configuration
#cat /etc/httpd/conf.d/nodejsnodejsssl.conf
<VirtualHost *:443>
    SSLEngine On
    SSLProxyEngine On
    ServerName 
nodejs.mydomain.com<https://urldefense.com/v3/__http:/nodejs.mydomain.com__;!!Dq0X2DkFhyF93HkjWTBQKhk!WYdO5ODHp0xIDZWNHki_OiUjJPTc3gEWggbB4kUa2MPDKfnlTEguMJRbRkrx-kqMHMF14hAw_uha7GeWGSbPY7A2BlwWSOR1BA$>
    SSLCertificateFile 
/etc/letsencrypt/live/nodejs.mydomain.com/cert.pem<https://urldefense.com/v3/__http:/nodejs.mydomain.com/cert.pem__;!!Dq0X2DkFhyF93HkjWTBQKhk!WYdO5ODHp0xIDZWNHki_OiUjJPTc3gEWggbB4kUa2MPDKfnlTEguMJRbRkrx-kqMHMF14hAw_uha7GeWGSbPY7A2Blwljjv0qA$>
    SSLCertificateKeyFile 
/etc/letsencrypt/live/nodejs.mydomain.com/privkey.pem<https://urldefense.com/v3/__http:/nodejs.mydomain.com/privkey.pem__;!!Dq0X2DkFhyF93HkjWTBQKhk!WYdO5ODHp0xIDZWNHki_OiUjJPTc3gEWggbB4kUa2MPDKfnlTEguMJRbRkrx-kqMHMF14hAw_uha7GeWGSbPY7A2Blx2A5_VMg$>
    SSLCertificateChainFile 
/etc/letsencrypt/live/nodejs.mydomain.com/chain.pem<https://urldefense.com/v3/__http:/nodejs.mydomain.com/chain.pem__;!!Dq0X2DkFhyF93HkjWTBQKhk!WYdO5ODHp0xIDZWNHki_OiUjJPTc3gEWggbB4kUa2MPDKfnlTEguMJRbRkrx-kqMHMF14hAw_uha7GeWGSbPY7A2BlxTYFdN1g$>
    <Location />
        ProxyPass 
http://localhost:8000/<https://urldefense.com/v3/__http:/localhost:8000/__;!!Dq0X2DkFhyF93HkjWTBQKhk!WYdO5ODHp0xIDZWNHki_OiUjJPTc3gEWggbB4kUa2MPDKfnlTEguMJRbRkrx-kqMHMF14hAw_uha7GeWGSbPY7A2BlyR-o3OPw$>
    </Location>
</VirtualHost>

When I am trying to access the URL 
https://nodejs.mydomain.com:8000/demo/index.html<https://urldefense.com/v3/__https:/nodejs.mydomain.com:8000/demo/index.html__;!!Dq0X2DkFhyF93HkjWTBQKhk!WYdO5ODHp0xIDZWNHki_OiUjJPTc3gEWggbB4kUa2MPDKfnlTEguMJRbRkrx-kqMHMF14hAw_uha7GeWGSbPY7A2BlwxyTdWyQ$>,
 I am encountering the below error on the browser.

This site can’t provide a secure connection
nodejs.mydomain.com<https://urldefense.com/v3/__http:/nodejs.mydomain.com__;!!Dq0X2DkFhyF93HkjWTBQKhk!WYdO5ODHp0xIDZWNHki_OiUjJPTc3gEWggbB4kUa2MPDKfnlTEguMJRbRkrx-kqMHMF14hAw_uha7GeWGSbPY7A2BlwWSOR1BA$>
 sent an invalid response.
ERR_SSL_PROTOCOL_ERROR

Please comment if the above httpd conf file is incorrect or If i am missing 
anything. Thanks in advance.

Best Regards,

Kaushal

Reply via email to