Saturday, October 22, 2016

Apache destination virtual host certificate when using mod_rewrite or ProxyPass

I am trying to use mod_rewrite or ProxyPass to redirect (PT) the client's request from virtual host A on 443 to different virtual host B on port 4434, also with SSL.
Like that:



SSLProxyEngine on
SSLProxyVerify none
SSLProxyCheckPeerCN off
SSLProxyCheckPeerName off
SSLProxyCheckPeerExpire off
ProxyPassMatch ^/vd https://localhost:4434



There is the way I am trying to use mod_rewrite:



RewriteEngine on
RewriteRule (.*) https://%{HTTP_HOST}:4434%{REQUEST_URI} [PT]


The problem is that my client validates server certificate and the on response the client gets the certificate of the virtual host A on 443 port, instead of virtual host B on 4434 port, so SSL handshake failed.



Is there any way to work around this problem ?

Thanks

No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...