Newbie question
Monah Baki
mbaki at aljolit.com
Wed May 13 08:05:43 CEST 2009
Hi all,
I'm trying to show management as a proof of concept varnish on freebsd 7.2.
I know it's supposed to be a reverse proxy and probably locally to your
network, but since we have no webserver, I want to set it up and point it to
ikea's website (just as a proof of concept).
My default.vcl is:
backend www {
.host = "www.ikea.com.sa";
.port = "80";
}
backend www1 {
.host = "www.ikeasaudi.com";
.port = "80";
}
sub vcl_recv {
if (req.http.host ~ "^ikea.com.sa$") {
set req.backend = www;
}
}
sub vcl_recv {
if (req.http.host ~ "^ikeasaudi.com$") {
set req.backend = www1;
}
}
# File type that we will always cache
sub vcl_recv {
if (req.request == "GET" && req.url ~
"\.(gif|jpg|swf|css|js|png|jpg|jpeg|gif|png|tiff|tif|svg|swf|ico|css|js|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;
}
}
Here is part of the logs, how can I tell it's working?
11 SessionOpen c 192.168.1.241 57592 :80
11 ReqStart c 192.168.1.241 57592 419225077
11 RxRequest c GET
11 RxURL c http://www.ikea.com.sa/
11 RxProtocol c HTTP/1.1
11 RxHeader c Host: www.ikea.com.sa
11 RxHeader c User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US;
rv:1.9.0.10) Gecko/2009042523 Ubuntu/9.04 (jaunty) Firefox/3.0.10
11 RxHeader c Accept:
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
11 RxHeader c Accept-Language: en-us,en;q=0.5
11 RxHeader c Accept-Encoding: gzip,deflate
11 RxHeader c Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
11 RxHeader c Keep-Alive: 300
11 RxHeader c Proxy-Connection: keep-alive
11 RxHeader c Cookie: f3571cbb2ae4c36582c82e33e80ba2a8=-;
mbfcookie[lang]=en; virtuemart=08490ee0f3529658159d22f4b334078d
11 VCL_call c recv
11 VCL_return c pass
11 VCL_call c pass
11 VCL_return c pass
12 BackendOpen b www 192.168.1.109 59301 70.40.211.108 80
11 Backend c 12 www www
12 TxRequest b GET
12 TxURL b http://www.ikea.com.sa/
12 TxProtocol b HTTP/1.1
12 TxHeader b Host: www.ikea.com.sa
12 TxHeader b User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US;
rv:1.9.0.10) Gecko/2009042523 Ubuntu/9.04 (jaunty) Firefox/3.0.10
12 TxHeader b Accept:
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
12 TxHeader b Accept-Language: en-us,en;q=0.5
12 TxHeader b Accept-Encoding: gzip,deflate
12 TxHeader b Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
12 TxHeader b Proxy-Connection: keep-alive
12 TxHeader b Cookie: f3571cbb2ae4c36582c82e33e80ba2a8=-;
mbfcookie[lang]=en; virtuemart=08490ee0f3529658159d22f4b334078d
12 TxHeader b X-Varnish: 419225077
12 TxHeader b X-Forwarded-For: 192.168.1.241
0 CLI - Rd ping
0 CLI - Wr 0 200 PONG 1242183717 1.0
12 RxProtocol b HTTP/1.1
12 RxStatus b 200
12 RxResponse b OK
12 RxHeader b Date: Wed, 13 May 2009 06:01:55 GMT
12 RxHeader b Server: Apache/2.2.11 (Unix) mod_ssl/2.2.11
OpenSSL/0.9.8i DAV/2 mod_auth_passthrough/2.1 mod_bwlimited/1.4
FrontPage/5.0.2.2635
12 RxHeader b X-Powered-By: PHP/5.2.9
12 RxHeader b Expires: Mon, 26 Jul 1997 05:00:00 GMT
12 RxHeader b Cache-Control: no-store, no-cache, must-revalidate,
post-check=0, pre-check=0
12 RxHeader b Pragma: no-cache
12 RxHeader b Set-Cookie:
f3571cbb2ae4c36582c82e33e80ba2a8=45af50eab544822fcdef7e40005cb6d4; path=/
12 RxHeader b Set-Cookie: lang=deleted; expires=Tue, 13-May-2008
06:01:55 GMT; path=/
12 RxHeader b Set-Cookie: mbfcookie=deleted; expires=Tue, 13-May-2008
06:01:55 GMT; path=/
12 RxHeader b Set-Cookie: mbfcookie[lang]=en; expires=Thu,
14-May-2009 06:01:56 GMT; path=/
12 RxHeader b Last-Modified: Wed, 13 May 2009 06:01:56 GMT
12 RxHeader b Transfer-Encoding: chunked
12 RxHeader b Content-Type: text/html
11 ObjProtocol c HTTP/1.1
11 ObjStatus c 200
11 ObjResponse c OK
11 ObjHeader c Date: Wed, 13 May 2009 06:01:55 GMT
11 ObjHeader c Server: Apache/2.2.11 (Unix) mod_ssl/2.2.11
OpenSSL/0.9.8i DAV/2 mod_auth_passthrough/2.1 mod_bwlimited/1.4
FrontPage/5.0.2.2635
11 ObjHeader c X-Powered-By: PHP/5.2.9
11 ObjHeader c Expires: Mon, 26 Jul 1997 05:00:00 GMT
11 ObjHeader c Cache-Control: no-store, no-cache, must-revalidate,
post-check=0, pre-check=0
11 ObjHeader c Pragma: no-cache
11 ObjHeader c Set-Cookie:
f3571cbb2ae4c36582c82e33e80ba2a8=45af50eab544822fcdef7e40005cb6d4; path=/
11 ObjHeader c Set-Cookie: lang=deleted; expires=Tue, 13-May-2008
06:01:55 GMT; path=/
11 ObjHeader c Set-Cookie: mbfcookie=deleted; expires=Tue, 13-May-2008
06:01:55 GMT; path=/
11 ObjHeader c Set-Cookie: mbfcookie[lang]=en; expires=Thu,
14-May-2009 06:01:56 GMT; path=/
11 ObjHeader c Last-Modified: Wed, 13 May 2009 06:01:56 GMT
11 ObjHeader c Content-Type: text/html
12 BackendReuse b www
11 TTL c 419225077 RFC 0 1242183717 1242194515 869893200 0 0
11 VCL_call c fetch
11 VCL_return c pass
11 Length c 41666
11 VCL_call c deliver
11 VCL_return c deliver
11 TxProtocol c HTTP/1.1
11 TxStatus c 200
11 TxResponse c OK
11 TxHeader c Server: Apache/2.2.11 (Unix) mod_ssl/2.2.11
OpenSSL/0.9.8i DAV/2 mod_auth_passthrough/2.1 mod_bwlimited/1.4
FrontPage/5.0.2.2635
11 TxHeader c X-Powered-By: PHP/5.2.9
11 TxHeader c Expires: Mon, 26 Jul 1997 05:00:00 GMT
11 TxHeader c Cache-Control: no-store, no-cache, must-revalidate,
post-check=0, pre-check=0
11 TxHeader c Pragma: no-cache
11 TxHeader c Set-Cookie:
f3571cbb2ae4c36582c82e33e80ba2a8=45af50eab544822fcdef7e40005cb6d4; path=/
11 TxHeader c Set-Cookie: lang=deleted; expires=Tue, 13-May-2008
06:01:55 GMT; path=/
11 TxHeader c Set-Cookie: mbfcookie=deleted; expires=Tue, 13-May-2008
06:01:55 GMT; path=/
11 TxHeader c Set-Cookie: mbfcookie[lang]=en; expires=Thu,
14-May-2009 06:01:56 GMT; path=/
11 TxHeader c Last-Modified: Wed, 13 May 2009 06:01:56 GMT
11 TxHeader c Content-Type: text/html
11 TxHeader c Content-Length: 41666
11 TxHeader c Date: Wed, 13 May 2009 03:01:58 GMT
11 TxHeader c X-Varnish: 419225077
11 TxHeader c Age: 1
11 TxHeader c Via: 1.1 varnish
11 TxHeader c Connection: keep-alive
11 ReqEnd c 419225077 1242183716.319736719 1242183718.637232304
0.004083157 2.315966845 0.001528740
0 StatAddr - 192.168.1.241 0 2 1 1 0 1 1 831 41666
11 ReqStart c 192.168.1.241 57592 419225078
11 RxRequest c GET
11 RxURL c
http://www.ikeasaudi.com/ikea.com.sa/mambots/system/jceutils/jscripts/jceutils.js
11 RxProtocol c HTTP/1.1
11 RxHeader c Host: www.ikeasaudi.com
11 RxHeader c User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US;
rv:1.9.0.10) Gecko/2009042523 Ubuntu/9.04 (jaunty) Firefox/3.0.10
11 RxHeader c Accept: */*
11 RxHeader c Accept-Language: en-us,en;q=0.5
11 RxHeader c Accept-Encoding: gzip,deflate
11 RxHeader c Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
11 RxHeader c Keep-Alive: 300
11 RxHeader c Proxy-Connection: keep-alive
11 RxHeader c Referer: http://www.ikea.com.sa/
11 RxHeader c Cookie:
f3571cbb2ae4c36582c82e33e80ba2a8=4e2be3c5222672b31f039dd97864ddb5;
mbfcookie[lang]=en; virtuemart=e4e5db67f6e31914d714315b3d0048f8
11 RxHeader c If-Modified-Since: Sun, 10 May 2009 21:03:14 GMT
11 RxHeader c If-None-Match: "41e9599-e72-4699530a4e880"
11 VCL_call c recv
11 VCL_return c lookup
11 VCL_call c hash
11 VCL_return c hash
11 VCL_call c miss
11 VCL_return c fetch
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20090513/9b6229df/attachment-0003.html>
More information about the varnish-misc
mailing list