Skip to main content

Posts

Showing posts from July, 2020

Speeding up Apache2 with Varnish; under ISPConfig 3

A virtual hosting requires Apache2 as webserver (due to the need for .htaccess). Hence can't directly replace it with NginX. Solution in brief: Setup a Varnish as cache but Varnish does not support SSL Hence we need to setup an NginX as reverse proxy to listen to port 443 and redirect the request to Varnish. The last step was to setup http to https re-direction. This could not be done directly under ISPConfig 3 http-to-https switch because this Apache2-based setting will create an infinite loop. This is resolved by creating a redirect within Varnish via its configuration language VCL. Solution step-by-step: Source: 1.  https://github.com/manoaratefy/ispconfig3-varnish When performing the steps by following Source 1, also turn off any Apache2 http to https redirect under ISPConfig after re-sync the websites. Then remove the default NginX vhost: rm /etc/nginx/sites-enabled/default Then perform the final steps as directed, i.e. restart the services: systemctl rest