Browsing articles tagged with "varnish - Admins Goodies"
Jan 7, 2013
tom

Why is Varnish not caching my index page properly?

I have a Varnish set up in front of Apache 2 on Ubuntu 11.10. I’m using this VCL file: backend default { .host = “127.0.0.1”; .port = “8080”; }sub vcl_recv { if (req.url ~ “^/web”) { unset req.http.cookie; } if (req.url ~ “administration” || req.url ~ “preview” ) { return(pass); } if (req.http.Cookie) { set req.http.Cookie = “;”+req.http.Cookie; set req.http.Cookie = regsuball(req.http.Cookie, “; +”, “;”); set req.http.Cookie = regsuball(req.http.Cookie, “;(mag_header)=”, “; \1=”); set req.http.Cookie = […]

Continue Reading »
Dec 23, 2012
tom

reverse proxy that caches post requests

I understand that varnish caches “GET” and “HEAD” requests by default. My backend servers fail when I do a get request that is too long, so I made them respond to POST instead of GET. This works great, but I need a reverse proxy which can be configured to cache POST responses just like GET. Are there any reverse proxies that can cache these post requests? Asked by nurettin It seems nginx does cache POST […]

Continue Reading »
Dec 20, 2012
tom

varnish delete least requested files

I see that varnish can be configured to set -smalloc or -sfile with a certain size. I want to set a file cache of 1G such that least requested files are deleted first when cache is full. Is this possible in varnish? Is there another reverse proxy tool that can do this? Asked by nurettin Varnish uses “least recently used” (LRU), for more information see: https://www.varnish-cache.org/trac/wiki/ArchitectureLRU Answered by KM01 Check more discussion of this question. […]

Continue Reading »
Oct 14, 2012
tom

Why is Varnish not caching?

I am troubleshooting the setup of Varnish 3.x on my Ubuntu server. I’m running Drupal 7 on two sites set up on the box, via named-based vhosts. Before trying to get Varnish to play nice with Drupal I’m trying to just get Varnish to a PNG from cache. Here are the headers I get from a curl -I request of the PNG file: HTTP/1.1 200 OK Server: Apache/2.2.22 (Ubuntu) Last-Modified: Sun, 07 Oct 2012 21:18:59 […]

Continue Reading »
Oct 2, 2012
tom

Can not find the “variables.tcl” file in Varnish Security

Varnish Security main.vcl contains # clear all internal variables include “/etc/varnish/security/build/variables.vcl”; and # fallthrough: clear all internal variables on security.vcl_recv exit include “/etc/varnish/security/build/variables.vcl”; but /etc/varnish/security/build/variables.vcl is not included into the git. I commented it out, and it is working fine but where can I get that file? Asked by Vladimir The Makefile has a target to build the variables file. Run “make all” to generate the file. Answered by pauska Check more discussion of this […]

Continue Reading »
Sep 15, 2012
tom

Configuring varnish and django (apache/modwsgi)

I am trying to work out why my application keeps hitting the database while I have setup varnish infront of apache. I think I am missing some vital configuration, any tips are welcome This is my curl result: HTTP/1.1 200 OK Server: Apache/2.2.16 (Debian) Content-Language: en-us Vary: Accept,Accept-Encoding,Accept-Language,Cookie Cache-Control: s-maxage=60, no-transform, max-age=60 Content-Type: application/json; charset=utf-8 Date: Sat, 15 Sep 2012 08:19:17 GMT Connection: keep-alive My varnishlog: 13 BackendClose – apache 13 BackendOpen b apache 127.0.0.1 […]

Continue Reading »
Sep 8, 2012
tom

Force request to miss cache but still store the response

I have a slow web app that I’ve placed Varnish in front of. All of the pages are static (they don’t vary for a different user), but they need to be updated every 5 minutes so they contain recent data. I have a simple script (wget –mirror) that crawls the entire website every 15 minutes. Each crawl takes about 5 minutes. The point of the crawl is to update every page in the Varnish cache […]

Continue Reading »
Sep 4, 2012
tom

nginx and varnish for caching forcing ssl

I’m in the process of doing my homework for a move from apache w/o caching to nginx with caching, possibly via varnish… After reading various blogs, articles, serverfault questions, etc. I understand that varnish cannot work with ssl, and that varnish might be better than nginx for actual caching of dynamic content. But I’m a little stuck in understanding how nginx caching works AND how nginx+varnish can play together when ssl is required. How would […]

Continue Reading »
Aug 25, 2012
tom

nginx: 502 bad gateway while using node.js varnish and stunnel

ive been following this tutorial: http://www.exratione.com/2012/08/websockets-over-ssl-stunnel-varnish-nginx-nodejs/ everything seems to run ok, except for my nginx setup. my node.js application runs on port 1337, varnish runs on port 80, stunnel on 443 and nginx on 8080. I can reach my app correctly when i specify the port (https://example.com:1337) but all I get when visiting https://example.com is a “502 Bad Gateway”. This is the output of my nginx log: 2012/08/25 14:13:59 [error] 6049#0: *1 no live upstreams […]

Continue Reading »
Aug 3, 2012
tom

Get varnishlog to log only 503 errors into file

I tried everything: service varnishlog start – logs everything varnishlog -D -c -m TxStatus:503 > /var/log/varnish/varnish.log – doesn’t seem to be doing anything varnishlog -c -m TxStatus:503 > /var/log/varnish/varnish.log – only logs until I close my SSH connection I’m out of options, any help? Note: varnishncsa is not an option, since it doesn’t tell me which error causes the 503. I’m running Varnish 3.x (latest) and CentOS 5.8 with Apache 2 as backend. Asked by […]

Continue Reading »
Pages:1234567...13»