Apache Reverse proxy Http to https
- by Coppes
I have a website which is fully running on Https. For some reason i did get the task to find a way to convert a url for example: http://www.domain.com/a/e-nc/youless to a https version of it, without losing HTTP POST header such as the POST values which are in it.
So i thought (not even sure) let's try to make a reversed proxy in apache and see how that works.
Anyway after a lot of struggling i came to the point to ask it here.
So to be speicific my goal is:
Convert the http://www.domain.com/a/e-nc/youless to https://www.domain.com/a/e-nc/youless without losing the POST conditions.
What i have tried until now is the following:
Created a file called: proxiedhosts in my apache2/sites-enabled folder with the following contents:
SSLProxyEngine On
SSLProxyCACertificateFile /etc/apache2/ssl/certificate****.pem
ProxyRequests Off
ProxyPreserveHost On
<Proxy *>
Order allow,deny
Allow from all
</Proxy>
ProxyPass /a/e-nc/youless/ https://www.domain.com/a/e-nc/youless/
ProxyPassReverse /a/e-nc/youless/ https://www.domain.com/a/e-nc/youless/
Thanks in advance!