文件操作 - vcl-example-acls.rst.txt
返回文件管理
返回主菜单
删除本文件
文件: /usr/share/doc/varnish/html/_sources/users-guide/vcl-example-acls.rst.txt
编辑文件内容
.. Copyright (c) 2013-2015 Varnish Software AS SPDX-License-Identifier: BSD-2-Clause See LICENSE file for full text of license ACLs ~~~~ You create a named access control list with the ``acl`` keyword. You can match the IP address of the client against an ACL with the match operator.:: # Who is allowed to purge.... acl local { "localhost"; "192.168.1.0"/24; /* and everyone on the local network */ ! "192.168.1.23"; /* except for the dialin router */ } sub vcl_recv { if (req.method == "PURGE") { if (client.ip ~ local) { return(purge); } else { return(synth(403, "Access denied.")); } } }
修改文件时间
将文件时间修改为当前时间的前一年
删除文件