광택재의 제거 구성에 문제가 있습니다. 아래에 구성한 제거 URL이 있지만 서비스를 시작하려고 할 때 아래에 오류가 발생합니다. 이 구성 부분을 주석 처리하면 서비스가 문제없이 시작됩니다. 누구든지 내가 잘못 가고있는 아이디어가 있습니까?시동 오류가 발생하는 바니시 제거 구성
건배.
sub vcl_recv {
#purge all
if (req.request == "PURGE") {
if (!client.ip ~ purge) {
error 405 "Not allowed.";
}
if (req.url ~ "varnish/index/purgeall/key/#Fj1nzljh") {
purge_hash(".*");
}
}
시작시 오류 메시지가 읽
[email protected]:/var/www$ sudo service varnish start
* Starting HTTP accelerator varnishd [fail]
storage_file: filename: /var/lib/varnish/ubuntu/varnish_storage.bin size 1024 MB.
Message from VCC-compiler:
Expected an action, 'if', '{' or '}'
(input Line 18 Pos 7)
purge_hash(".*");
------##########---------
Running VCC-compiler failed, exit 1
VCL compilation failed
[email protected]:/var/www$ sudo service varnish start
* Starting HTTP accelerator varnishd [fail]
storage_file: filename: /var/lib/varnish/ubuntu/varnish_storage.bin size 1024 MB.
Message from VCC-compiler:
Expected an action, 'if', '{' or '}'
(input Line 18 Pos 7)
purge_hash(".*");
2.1에서 제거라고하는 것을 3.0에서 금지라고합니다. OP는 이것을 위해 ban()을 사용할 수 있습니다. https://www.varnish-cache.org/docs/3.0/tutorial/purging.html을 참조하십시오. – lkarsten