Install Varnish In OSX Lion

$brew install varnish

lets edit our new Varnish VCL configuration

$vim /usr/local/etc/varnish/default.vcl

uncomment section BACKEND,

backend default {
.host = “shop.risnandar”;
.port = “80”;
}

To start varnish in OSX:

$sudo varnishd -f /usr/local/etc/varnish/default.vcl -ashop.risnandar:8080 -s file,/tmp,500M -T localhost:6082

test by using CURL

$curl -I http://shop.risnandar:8080/

varnish-curl

reference:

to kill varnish

$sudo pkill varnishd

Troubleshooting:

Error 503 Service Unavailable

Service Unavailable

Guru Meditation:

XID: 240925122


Varnish cache server

>> answer, your backend (main server) is not reachable, check if your website working normally

 

Iklan