Apache reverse proxy forwarding https header
I have successfully installed reverse proxy on Apache. It works like a charm. I'm using it to proxy https request to http. My problem is that I need to forward variable SERVER_HTTPS to my end server, to indicate if person is using ssl connection or just http. I have found one way to do: Each time I can forward HTTP_X_FORWARDED_PROTO variable and check on end server:
if ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')
But this variant is not good for me, because I can't edit the end servers scripts. Lets say that I don't even have access to it. But I know how to check if it is forwarded. So, Generally my question is: Is there any way that I can forward this variable? I have seen one more variant, with Rewrite engine , but it didn't work for me and there is no detailed information. Maybe If I will set my server on Nginx + apache this will send this header variable?