Varnish 2 VCL
How do i get varnish to cache all images? I had varnish 1 working with this but it seems my vcl does not work at all with 2 Here is my VCL # # This is a basic VCL configuration file for varnish. See the vcl(7) # man page for details on VCL syntax and semantics. # # $Id: default.vcl 1818 2007-08-09 12:12:12Z des $ # # Default backend definition. Set this to point to your content # server. backend default { .host = "127.0.0.1"; .port = "80"; } acl purge { "localhost"; } sub vcl_recv { if (req.request == "PURGE") { if (!client.ip ~ purge) { error 405 "Not allowed."; } lookup; } if (req.request != "GET" && req.request != "HEAD") { pipe; } if (req.http.Expect) { pipe; } /* Always cache images and binaries */ if (req.url ~ "\.(jpg|jpeg|gif|png|tiff|tif|svg|swf|ico|vsd|doc|ppt|pps|xls|pdf|mp3|mp4|m4a|ogg|mov|avi|wmv|sxw|zip|gz|bz2|tgz|tar|rar|odc|odb|odf|odg|odi|odp|ods|odt|sxc|sxd|sxi|sxw|dmg|torrent|deb|msi|iso|rpm)$") { lookup; } /* Always cache CSS and javascript */ if (req.url ~ "\.(css|js)$") { lookup; } lookup; } /* Deal with purge requests */ sub vcl_hit { if (req.request == "PURGE") { set obj.ttl = 0s; error 200 "Purged"; } deliver; } sub vcl_miss { if (req.http.If-Modified-Since) { pass; } if (req.request == "PURGE") { error 404 "Not in cache"; } fetch; } sub vcl_fetch { if (!obj.valid) { error; } if (!obj.cacheable) { pass; } if (obj.http.Set-Cookie) { pass; } if(obj.http.Set-Cookie){ pass; } if(obj.http.Pragma ~ "no-cache" || obj.http.Cache-Control ~ "no-cache" || obj.http.Cache-Control ~ "private"){ pass; } if (req.url ~ "(errorPage?)") { set obj.ttl = 0s; } if (req.url ~ "(exceptionPage?)") { set obj.ttl = 0s; } if (req.url ~ "(unauthorizedPage?)") { set obj.ttl = 0s; } if (req.url ~ "(type=The+requested+Virtual+Kiosk+is+currently+not+available+from+%5Benter+Virtual+Kiosk+Sponsor+Name+here%5D.+Please+close+the+Virtual+Kiosk+and+try+again.)") { set obj.ttl = 0s; } insert; } sub vcl_deliver { remove resp.http.X-Varnish; remove resp.http.Via; }___ varnish-misc mailing list varnish-misc@projects.linpro.no http://projects.linpro.no/mailman/listinfo/varnish-misc
Varnish and awstats
Is there a trick to getting awstats to work with varnish? I tried doing varnishncsa -a -w filename and then pointed awstats to this file but it gives me an error that the log format must be incorrect Create/Update database for config "/etc/awstats/awstats.mmvk.hidden.net.conf" by AWStats version 6.7 (build 1.892) From data in log file "hidden/lb.log"... Phase 1 : First bypass old records, searching new record... Direct access after last parsed record (after line 9835) AWStats did not find any valid log lines that match your LogFormat parameter, in the 50th first non commented lines read of your log. Your log file /hidden/lb.log must have a bad format or LogFormat parameter setup does not match this format. Your AWStats LogFormat parameter is: 4 This means each line in your web server log file need to have "common log format" like this___ varnish-misc mailing list varnish-misc@projects.linpro.no http://projects.linpro.no/mailman/listinfo/varnish-misc
Varnish 1.1.1 FreeBSD 6.2
executing a make get's Making all in varnishtop gcc -DHAVE_CONFIG_H -I. -I../.. -I../../include -include config.h -g -O2 -MT varnishtop-varnishtop.o -MD -MP -MF .deps/varnishtop-varnishtop.Tpo -c -o varnishtop-varnishtop.o `test -f 'varnishtop.c' || echo './'`varnishtop.c mv -f .deps/varnishtop-varnishtop.Tpo .deps/varnishtop-varnishtop.Po /usr/local/bin/bash ../../libtool --tag=CC--mode=link gcc -include config.h -g -O2 -o varnishtop varnishtop-varnishtop.o ../../lib/libvarnish/libvarnish.la ../../lib/libvarnishcompat/libvarnishcompat.la ../../lib/libvarnishapi/libvarnishapi.la -lcurses -lthr gcc -include config.h -g -O2 -o .libs/varnishtop varnishtop-varnishtop.o ../../lib/libvarnish/.libs/libvarnish.so ../../lib/libvarnishcompat/.libs/libvarnishcompat.so ../../lib/libvarnishapi/.libs/libvarnishapi.so -lcurses -lthr -Wl,--rpath -Wl,/usr/local/lib creating varnishtop Making all in man Making all in etc Making all in doc --xinclude -o changes-1.0.4.html changes-1.0.4.xml --xinclude:No such file or directory *** Error code 1 Stop in /usr/local/src/varnish-1.1.1/doc. *** Error code 1 Stop in /usr/local/src/varnish-1.1.1. *** Error code 1 Stop in /usr/local/src/varnish-1.1.1.___ varnish-misc mailing list varnish-misc@projects.linpro.no http://projects.linpro.no/mailman/listinfo/varnish-misc
Varnish 1.1.1 FreeBSD 6.2
During a ./configure I see this. checking sys/mount.h presence... yes configure: WARNING: sys/mount.h: present but cannot be compiled configure: WARNING: sys/mount.h: check for missing prerequisite headers? configure: WARNING: sys/mount.h: see the Autoconf documentation configure: WARNING: sys/mount.h: section "Present But Cannot Be Compiled" configure: WARNING: sys/mount.h: proceeding with the preprocessor's result configure: WARNING: sys/mount.h: in the future, the compiler will take precedence configure: WARNING: ## - ## configure: WARNING: ## Report this to [EMAIL PROTECTED] ## configure: WARNING: ## - ## checking for sys/mount.h... yes --- Jonathan Douglas Director Of Network Operations BKS Networks, Inc. 1266 East Main Street Stamford, CT 06902 http://www.bksnetworks.com email: [EMAIL PROTECTED] phone: 203-406-0723 mobile: 203-912-9245 fax: 860-740-6835___ varnish-misc mailing list varnish-misc@projects.linpro.no http://projects.linpro.no/mailman/listinfo/varnish-misc
Redhat
Are there instructions on installing this on Redhat systems? I am able to get it working on FreeBSD 6.2 but not RHEL 4 with a 2.6 Kernel. When I try to build an rpm from spec i get: Executing(%doc): /bin/sh -e /var/tmp/rpm-tmp.27483 + umask 022 + cd /usr/src/redhat/BUILD + cd varnish-1.1 + DOCDIR=/var/tmp/varnish-1.1-1-root-root/usr/share/doc/varnish-libs-1.1 + export DOCDIR + rm -rf /var/tmp/varnish-1.1-1-root-root/usr/share/doc/varnish-libs-1.1 + /bin/mkdir -p /var/tmp/varnish-1.1-1-root-root/usr/share/doc/varnish-libs-1.1 + cp -pr LICENSE /var/tmp/varnish-1.1-1-root-root/usr/share/doc/varnish-libs-1.1 + exit 0 Provides: libvarnish.so.0 libvarnishapi.so.0 libvcl.so.0 Requires(interp): /sbin/ldconfig /sbin/ldconfig Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 Requires(post): /sbin/ldconfig Requires(postun): /sbin/ldconfig Requires: libc.so.6 libc.so.6(GLIBC_2.0) libc.so.6(GLIBC_2.1) libc.so.6(GLIBC_2.1.3) libc.so.6(GLIBC_2.2) libc.so.6(GLIBC_2.3) libc.so.6(GLIBC_2.3.4) librt.so.1 librt.so.1(GLIBC_2.2) Processing files: varnish-debuginfo-1.1-1 Provides: libvarnish.so.0.0.0.debug libvarnishapi.so.0.0.0.debug libvcl.so.0.0.0.debug Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 Checking for unpackaged file(s): /usr/lib/rpm/check-files /var/tmp/varnish-1.1-1-root-root error: Installed (but unpackaged) file(s) found: /usr/include/varnish/shmlog.h /usr/include/varnish/shmlog_tags.h /usr/include/varnish/stat_field.h /usr/include/varnish/stats.h /usr/include/varnish/varnishapi.h /usr/lib/pkgconfig/varnishapi.pc RPM build errors: Installed (but unpackaged) file(s) found: /usr/include/varnish/shmlog.h /usr/include/varnish/shmlog_tags.h /usr/include/varnish/stat_field.h /usr/include/varnish/stats.h /usr/include/varnish/varnishapi.h /usr/lib/pkgconfig/varnishapi.pc___ varnish-misc mailing list varnish-misc@projects.linpro.no http://projects.linpro.no/mailman/listinfo/varnish-misc