I am trying to set up what i believe needs to be a reverse proxy in Apache 2.
I have apache set up and i have Mod_proxy,mod_ssl,Mod_rewrite all enabled.
i am trying to control a media player through its HTTPS web page, it does not allow http connections. Unfortunately the contol system does not do Https. it technically doesn't even really do http (it is not a browser). although I can form HTTP packets and parse the responses. I do this regularly with other products.
so what i want to do is send a HTTP request to my apache2 server at 192.168.0.17:80, have the Apache server forward that request to the HTTPS media server at 192.168.0.12:443. and then return the resulting source code back to the original client in plain text for parsing. Once the info is parsed i will use it to fill variables and then use those varible to generate the a http packet to simulate some one clicking particular GUI elements.
All machines are on a local network dedicated to the control system and while it does have a internet connection I don't need to have the proxy handle any requests from the wan side, In fact i only need the proxy to handle requests from a single local IP address.
I know i need to set up a virtual host file that is something like this
<VirtualHost 184.108.40.206:80> ServerName foo.com SSLProxyEngine On SSLProxyCheckPeerCN on SSLProxyCheckPeerExpire on ProxyPass / https://secure.bar.com ProxyPassReverse / https://secure.bar.com
But just cant wrap my head around what IP info needs to go where or what other setting i might need to change.
As a side question, is there anyway to script apache to maintain the login on the https server and re authenticate if session times out? I will likely be polling the server every few seconds for some of my feedback elements but it would still be nice to off load the login process to apache if possible
Thanks for any help. I now have exactly 4 hours of experience with raspberry pi and apache.