I need to proxing of HTTPS pages, that hidden behind router.
Public internet -> Router -> port forwarding 443 -> first apache2 web server -> need proxying to my second apache2 web server
I'm port forwarding port 443 to my first local server (where is first.example.com running on 443), but second.example.com runs on sencond web server. And I need set proxy on first server to proxing me pages from second server.
I tried to edit Apache2 virtual host
<VirtualHost second.example.com:443> ... ProxyPass / https://second.example.com/ ProxyPassRewerse / https://second.example.com/ ... </VirtualHost>
FIRST PROBLEM is that first Apache2 ignore VirtualHost second.example.com at all... because in local DNS second.example.com is routed to real second.example.com
SECOND PROBLEM when I change DNS to second.example.com routed to first server. ProxyPass rule to new DNS record https://second-on-second.example.com than my browser did not show content of HTTPS comunication, because od SNI error... because now certificate didn't coresponding domain. Same error will ocurrect, when I change ProxyPass to IP of second server.
Could me anybody help how do working proxying of web