How to Install Varnish Cache in Front of Apache (AlmaLinux, Rocky Linux and Ubuntu)
Hosting Guides

How to Install Varnish Cache in Front of Apache (AlmaLinux, Rocky Linux and Ubuntu)

Install Varnish from your distribution's packages (dnf install varnish or apt install varnish), move Apache to port 8080, point Varnish's backend at 127.0.0.1:8080 in /etc/varnish/default.vcl, and make Varnish listen on port 80. Varnish does not handle HTTPS, so put Nginx or Hitch in front of it on port 443. Test with curl -I and look for the X-Varnish and Age headers. On cPanel servers, use NGINX Manager in WHM instead.

Read article 6 min read
Backups

How to Back Up and Restore a cPanel Account Over SSH (pkgacct and restorepkg)

As root, run /scripts/pkgacct USERNAME /backup to package one cPanel account (files, databases, email and settings) into /backup/cpmove-USERNAME.tar.gz. Copy the file off the server. To restore it on the same or another cPanel server, put the file in /home and run /scripts/restorepkg /home/cpmove-USERNAME.tar.gz. Restoring over an existing account replaces its data, so test first.

Read article 4 min read
UnderHost Blog

Guides, security notes and news for modern hosting.

Practical, real-world articles on offshore hosting, Linux and cPanel administration, server security and the technology behind our network, written by the UnderHost team.

Popular topics

Quick actions