0

I have some servers with http apps. Now i need to secure it with https but i cant do it individualy, all of them is on same public IP.

So i decided to create HTTP Gateway - transparent proxy server. I must run it on Windows Server 2016.

I have installed XAMPP server and letsencrypt-simple. I have successfully requested and installed certificate, but on visit of website it is still make "Too many redirects" (and it is secured by HTTPS), whitout proxy it works well.

My virtualhosts:

<VirtualHost *:80>
 ServerName [public_domain_name]
 ProxyPreserveHost On 
 DocumentRoot C:\HTTP\SERVER\htdocs\app1
 ProxyPass C:\HTTP\SERVER\htdocs\app1\.well-known !
 ProxyPass / http://192.168.1.9/app1/
 ProxyPassReverse / http://192.168.1.9/app1/
</VirtualHost>

<VirtualHost *:443>
 ServerName [public_domain_name]
 ProxyPreserveHost On 
 DocumentRoot C:\HTTP\SERVER\htdocs\app1
 ProxyPass C:\HTTP\SERVER\htdocs\app1\.well-known !
 ProxyPass / http://192.168.1.9/app1/
 ProxyPassReverse / http://192.168.1.9/app1/

 SSLEngine on
 SSLCertificateFile "C:\ProgramData\win-acme\httpsacme-v01.api.letsencrypt.org\[public_domain_name]-crt.pem"
 SSLCertificateKeyFile "C:\ProgramData\win-acme\httpsacme-v01.api.letsencrypt.org\[public_domain_name]-key.pem"
 SSLCertificateChainFile "C:\ProgramData\win-acme\httpsacme-v01.api.letsencrypt.org\ca-[public_domain_name]-crt.pem"
</VirtualHost>
  • Can you test from command line, with `curl`: try to run `curl -v https://public_domain_name` and examine `Location` header in response. – Dusan Bajic Apr 27 '18 at 12:27
  • Thank you for directing me. Problem solved :). – Ondřej Douša Apr 30 '18 at 06:05
  • thanks for directing on header read. After some research i found a solution. Alll problems is in loading modules in Apache. This article helps a lot: https://www.askapache.com/hosting/reverse-proxy-apache/ – Ondřej Douša Apr 30 '18 at 06:05

0 Answers0