mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
1.0 KiB
1.0 KiB
Setting up Varnish
This document will explain how to setup Varnish for LibreNMS.
Varnish installation
This example is based on a fresh LibreNMS install, on a minimimal CentOS installation. In this example, we'll use the default package available through yum.
- Install Varnish
yum install varnish
chkconfig varnish on
- Confirm that Varnish has been installed
varnishd -V
varnishd (varnish-2.1.5 SVN )
-
Change the webservers port to 8080, since we'll put Varnish in front(Or whatever you prefer)
-
Point Varnish towards the webserver by editing the default.vcl
vi /etc/varnish/default.vcl
backend default {
.host = "127.0.0.1";
.port = "8080";
}
- Change the default port Varnish listens on
vi /etc/sysconfig/varnish
VARNISH_LISTEN_PORT=80
- Restart webserver(Apache in this case) and start Varnish afterwards
service httpd restart
service varnish start
- Browse around the webui to build up the cache, verify that the cache is working afterwards
varnishstat