小编ete*_*yro的帖子

清漆无法识别 req.hash

我在 Redhat 上安装了 Varnish 3.0.2,并且在添加 vcl_hash 部分后服务 varnish 启动失败。我做了 varnishd 然后使用 vcl.load 加载了 vcl

vcl.load default default.vcl

Message from VCC-compiler:
Unknown variable 'req.hash'
At: ('input' Line 24 Pos 9)
    set req.hash += req.url;
--------########------------

Running VCC-compiler failed, exit 1
Run Code Online (Sandbox Code Playgroud)

猫默认.vcl

backend default {
  .host = "127.0.0.1";
  .port = "8080";
}

sub vcl_recv {
  if( req.url ~ "\.(css|js|jpg|jpeg|png|swf|ico|gif|jsp)$" ) {
    unset req.http.cookie;
  }
}

sub vcl_hash {
  set req.hash += req.url;
  set req.hash += req.http.host;
  if( req.httpCookie == "JSESSIONID" ) { …
Run Code Online (Sandbox Code Playgroud)

redhat varnish

4
推荐指数
1
解决办法
2258
查看次数

标签 统计

redhat ×1

varnish ×1