I need to connect to an external server via SSL which only accepts certificates exchange following this architecture :
Client (my Nodejs server) -----http-----> (Reverse?) Proxy ----https-----> External Server asking for certificate.
I don't own the external server, but they have my certificates installed in their system.
I used Let's Encrypt to generate certificates, so I have 4 files :
privkey.pem --> Private Key cert.pem --> Public Key chain.pem --> Certificate Chain fullchain.pem --> Concatenation of cert.pem and chain.pem
Current, not working, apache 2.4.33 vhost configuration :
<VirtualHost *:80> SSLProxyEngine On SSLProxyVerify require SSLCertificateFile path/fullchain.pem SSLCertificateKeyFile path/privkey.pem SSLProxyMachineCertificateChainFile path/fullchain.pem SSLProxyCACertificateFile path/fullchain.pem # mydomain.certandkey.pem is a concatenation of cert.pem and privkey.pem SSLProxyMachineCertificateFile mydomain.certandkey.pem ProxyRequests Off RewriteEngine On #ProxyPreserveHost On #<Proxy *> #Order deny,allow #Allow from all #</Proxy> ProxyPass / https://external.server.com/ ProxyPassReverse / https://external.server.com/ </VirtualHost>
The apache error log is
AH02252: incomplete client cert configured for SSL proxy (missing or encrypted private key?) [date] [ssl:emerg] [pid 76986] AH02312: Fatal error initialising mod_ssl, exiting. AH00016: Configuration Failed
It seems to come from
SSLProxyMachineCertificateFile as it goes away when I comment the corresponding line (but connection doesn't doesn't work).
Does any one have an idea how to fix this or meet a similar connection situation ?
I've spent my last two days looking over the internet and trying many configurations, it drives me crazy.
Thank you very much.