I have configured a reverse proxy server that will allow the client to communicate to an endpoint URL (https://uat-enq.ctos.com.my:8443/ctos/Proxy?wsdl) via it.
This is the reverse proxy config file :
<VirtualHost _default_:443>
SSLEngine on
# ServerName localhost
SSLCertificateFile /etc/pki/tls/certs/localhost.crt
SSLCertificateKeyFile /etc/pki/tls/private/localhost.key
SSLProxyEngine On
SSLProxyVerify require
SSLProxyCheckPeerCN on
SSLProxyCheckPeerExpire on
ProxyRequests Off
ProxyPreserveHost On
ProxyPass /ctos/Proxy https://uat-enq.ctos.com.my:8443/ctos/Proxy acquire=100 retry=0 keepalive=on connectiontimeout=20
ProxyPassReverse /ctos/Proxy https://uat-enq.ctos.com.my:8443/ctos/Proxy
RewriteEngine On
RewriteRule ^/ctos/Proxy(.*)$ /$1 [P]
</VirtualHost>
From this reverse proxy server, I am able to reach the endpoint URL with curl (photo attached).
However, when I run curl via the reverse proxy server, it fails (photo attached).
I am not sure how to debug the problem, as I have tried so many things, but it still fails. Some of the things I have done to debug :
Check the httpd log files for the reverse proxy to see if there are any indications of why it fails
Check connectivity between reverse proxy to endpoint URL via the 8443 port using telnet and curl : success
Check connectivity between client to endpoint URL via the 8443 port using telnet and curl : telnet is a success, but curl returns SSL Connect (35) error. However this is related to curl version, which is why I am using the reverse proxy to substitute for the outdated TLS version of the client server to communicate with the endpoint URL.
Check connectivity between client to reverse proxy via telnet port 443 : success
X-Forwarded-For parameter : I did some googling and it mentioned something about allowing the client's ip using the X-Forwarded-For parameter in the reverse proxy server. However when I check httpd.conf, I see the parameter already there :
# LogFormat LogFormat "%{X-Forwarded-For}i %h %l %u %t \"%r\" %>s %b [%Tsec] \"%{Referer}i\" \"%{User-Agent}i\"" combined LogFormat "%h %l %u %t \"%r\" %>s %b" common LogFormat "%{Referer}i -> %U" referer LogFormat "%{User-agent}i" agent
Could you please help pinpoint what are the errors/problems in my config to fix this issue? I still have no clue till this stage.