Re: Reverse proxy to a website with HTTPS
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: "users@xxxxxxxxxxxxxxxx" <users@xxxxxxxxxxxxxxxx>
- Subject: Re: Reverse proxy to a website with HTTPS
- From: Scott Trakker <scott.trakker@xxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 23 Aug 2021 18:34:54 +0000
- Reply-to: users@xxxxxxxxxxxxxxxx
- Reply-to: Scott Trakker <scott.trakker@xxxxxxxxxxxxxx>
I found the solution to my problem!
If
you want to configure a reverse proxy with HTTPS you have to install
the SSL-certificates on the host (and not in the remote server or
virtual machine)!
This is the final virtual hosts file:
ServerName localhost
DocumentRoot /var/www/html/
<VirtualHost *:80 >
ServerName [your.domain.com]
ProxyPreserveHost On
ProxyPassReverse / http://[IP address virtual machine]/ RewriteEngine on
RewriteCond %{SERVER_NAME} =[your.domain.com]
</VirtualHost>
<VirtualHost *:443 >
ServerName [your.domain.com]
SSLProxyEngine on
ProxyPreserveHost On
ProxyPassReverse / http://[IP address virtual machine]/ SSLCertificateFile /etc/letsencrypt/live/[your.domain.com]/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/[your.domain.com]/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
For the installation of the SSL-certificate I used Let's Encrypt. No need to use any other third-party software!
All the steps that I made, can be found here:
--------------------------------------------------------
Support the independent web, use Firefox
[Index of Archives]
[Open SSH Users]
[Linux ACPI]
[Linux Kernel]
[Linux Laptop]
[Kernel Newbies]
[Security]
[Netfilter]
[Bugtraq]
[Squid]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Samba]
[Video 4 Linux]
[Device Mapper]