Changes

Jump to navigation Jump to search
1,090 bytes added ,  23:22, 9 June 2017
no edit summary
Line 73: Line 73:  
$sudo ufw status numbered                                # test status
 
$sudo ufw status numbered                                # test status
 
</pre>
 
</pre>
 +
 +
== Load Balancer for virtual hosts with https ==
 +
 +
* Enable apache24 proxy and ssl modules:
 +
<pre>
 +
$sudo a2enmod proxy proxy_balancer proxy_http ssl
 +
</pre>
 +
* Now create and enable at /etc/apache2/sites-available:
 +
 +
<pre>
 +
<VirtualHost *:80>
 +
ServerName linuxonlinehelp.de
 +
ServerAlias www.linuxonlinehelp.de
 +
RedirectPermanent / https://linuxonlinehelp.de/
 +
</VirtualHost>
 +
 +
<VirtualHost *:443>
 +
ProxyRequests off  #MAJOR!!
 +
ServerName linuxonlinehelp.de
 +
ServerAlias www.linuxonlinehelp.de
 +
 +
ProxyPreserveHost on
 +
ProxyPass / balancer://linuxblog:443/
 +
ProxyPassReverse / balancer://linuxblog:443/
 +
 +
<Proxy *>
 +
Require all granted
 +
</Proxy>
 +
 +
<Proxy balancer://linuxblog>
 +
                BalancerMember https://192.168.XXX.001
 +
                BalancerMember https://192.168.XXX.002
 +
                ProxySet lbmethod=byrequests
 +
</Proxy>
 +
SSLProxyEngine on
 +
SSLEngine on
 +
SSLCertificateFile    /etc/ssl/cert.pem
 +
SSLCertificateKeyFile  /etc/ssl/privkey.pem
 +
SSLCACertificateFile  /etc/ssl/fullchain.pem
 +
</VirtualHost>
 +
</pre>
 +
 +
Remark: Disable ALWAYS!! the Balance Manager for Security Reasons over apache2.conf

Navigation menu