Skip to content
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Varnish requires a GCC-compiler compatible with the compiler used to
build varnish with. This means GCC 3.4.6 on a standard RHEL4 system.

Varnish should work fine with GCC 3.3 and above.

Upgrading from 1.x to 2.0
There are a few changes in the vcl language from varnish-1.x to 2.0.
Because of varnish' dynamic vcl loading feature, there is no way to
guarantee that the vcl file in use actually exists on disk. Thus,
there is no way to securely automate this process, and one must do the
changes by hand.

In vcl, the word "insert" has been replaced by "deliver". 

In the vcl declaration of backends, where one earlier used "set
backend", backend parts are now just prefixed with a dot, so the
default localhost configuration will look like this:

backend default {
  .host = "";
  .port = "80";

Configuration of addresses and ports
In this package, varnish is configured to make the accelerator daemon
listen to port 6081. The administration interface listens to port 6082
on Addresses and ports can be changed in

The admin interface can be accessed by standard telnet.

The default config will try to forward http requests to
localhost:80. You may change this in /etc/varnish/vcl.conf. Please
read the vcl(7) man page for more information on the vcl language.

To gain actual value from varnish, you may want to move the listening
port to port 80, and your webserver to 8080 or similar.

Running with jemalloc on ppc or ppc64 on fedora: Edit and recompile
To get a package through to Fedora, it has to build in Red Hat's Koji
build environment. Their ppc and ppc64 builders run mock on a RHEL
ppc64 kernel. Our use of jemalloc does not work on this kernel, and
the build stays unsuccessful. As ppc64 is not the primary target of
varnish development, it may take some time to get this bug fixed. 
To get the package through to Fedora, jemalloc is disabled in the ppc
and ppc64 builds. 

Now, varnish with jemalloc enabled is known to work at least on the
ppc (32bit) kernel in Fedora 9. If you run on ppc, and have a workload
that suits jemalloc better, you might want to change the specfile and
recompile.  We would very much like feedback from anyone running
varnish on Fedora's own ppc64 kernel.

Building a RPM package from SVN
You may build the package from a svn checkout. Follow the instructions
at to get the
source. Then enter the trunk directory and edit
varnish-cache/redhat/varnish.spec. At least bump the version and/or
release numbers, and uncomment the autogen call. You need to install
the autoconf and automake packages. Then use something like this to
build the rpm package:

VERSION=$( awk ' /^Version:/ { print $2 } ' varnish-cache/redhat/varnish.spec )
ln -s varnish-cache varnish-$VERSION
tar $(
    find varnish-$VERSION/ -type d -name .svn | \
        while read i; do 
            echo -n "--exclude $i "
) -cvzf varnish-$VERSION.tar.gz varnish-$VERSION/*
rm varnish-$VERSION
rpmbuild -ts varnish-$VERSION.tar.gz
# End of script

This builds a source rpm. Then you can, for example on a RHEL4 system,
do something like this:

rpmbuild --define "dist el4" --rebuild /path/to/varnish-1.1.2.src.rpm

Something went wrong with that request. Please try again.