Setup guide for running Varnish on the same server with Plesk 11 on CentOS.
Setup Varnish
Start Varnish install, add vcl file for sites or apps (ex: in my case it’s for Drupal), configure varnish to exclude other sites or domains (ex: if not all sites on plesk server will use varnish), then configure your varnish server (ex: varnish port to 80, storage, apache backend, etc).
- Install Varnish (for RHEL/CentOS):
1 2 | |
- Add varnish vcl file, default at /etc/varnish/default.vcl
- If not all sites on plesk will use varnish, create exclude list for vcl receive (sample below).
1 2 3 4 | |
- Configure varnish server /etc/sysconfig/varnish to run on port 80. Don’t start Varnish yet since apache still runs on port 80.
Change Apache Port and Update VirtualHosts
Change Apache port from 80 to something else (ex: 8080) in Plesk configuration. Update all the virtualhost configs to use new apache port as well.
- Backup first the plesk database config.