在windows环境中使用varnish

varnish 的windows 版本下载地址:

 
http://sourceforge.net/projects/cygvarnish/files/windows-zip-bundle/
 
 
 
启动:varnish:
 
C:\varnish\bin>varnishd -a :80 -T :3500 -f c:/varnish/etc/default.vcl -s file,c:/varnish/var/cache,1000M
 
-a:80表示,让varnish监听在80端口。
 
-T是为varnish指定一个管理端口;
 
-f指定所要使用的配置文件;
 
后面的参数只是让varnish使用文件缓存,大小为1000M,当然,应该根据实际情况指定大小;
 
启动varnish后,如果我们请求http://地址:端口/,就可以等到200OK状态码,那表示varnish已经在正确滴接受请求。
posted @ 2015-07-21 18:14  大智若简  阅读(293)  评论(0编辑  收藏  举报