Comments on How to speed up Apache with Varnish HTTP cache on Ubuntu 16.04 LTS

In this tutorial, we will show you how to install and configure the Varnish HTTP accelerator as a reverse proxy for an Apache web server. Varnish is a proxy server focused on HTTP caching. It's designed as an HTTP accelerator and can act as a reverse proxy for your web server.

5 Comment(s)

Add comment

Please register in our forum first to comment.

Comments

By: fat_mike

 "sed -i -e 's/80/8080/g' ports.conf

sed -i -e 's/80/8080/g' sites-available/*"

This commands are totally crazy. Replace 80 with 8080 in every occurance...

By: till

I agree that the author of the article should have made the sed statements a bit more precise. But unless you use domain names like mydomain80.tld, then the commands should be ok as all occurrences of port 80 must be replaced with 8080 as varnish will be listening on port 80 and Apache on 8080.

By: fat_mike

Sadly there are more occurances than ports in sites-available folder.

For example if you have installed ISPconfig 3+ there are a lot of 80 occurances that I think shouldn't be replaced and don't make any sense. A newbie will end up with a broken apache configuration.

apps.vhost

Listen 8081 becomes Listen 808081

 

ipsconfig.vhost

Listen 8080 becomes Listen 80808080

VirtualHost _default_:8080 becomes VirtualHost _default_:80808080

Header always add Strict-Transport-Security "max-age=15768000" becomes  Header always add Strict-Transport-Security "max-age=1576808000"

SSLStaplingCache shmcb:/var/run/ocsp(128000) becomes SSLStaplingCache shmcb:/var/run/ocsp(12808000)

 

The Alias of php fcgi change in all of the vhosts you have enabled.

Any 80 occurance will become 8080. You see where I going with that?

 

Kind Regards

 

By: till

This tutorial is not intended to be installed on an ISPConfig server. The guide assumes that you start from an empty Ubuntu system.

By: fat_mike

OK.

Just letting people know that these commands:

"sed -i -e 's/80/8080/g' ports.conf

sed -i -e 's/80/8080/g' sites-available/*"

will replace every occurance of 80 with 8080 (not just the ones that reffering to ports) which is not a good practice.