我刚刚安装了清漆并准备好提供网页。
问题是我们正在打开文件限制。
我们已将ulimit
设置为varnish用户。
我们希望找到一个可以编写此配置的文件:
# Maximum number of open files
NFILES=131072
# Locked shared memory, default log size is 82MB + header
MEMLOCK=82000
## Configuration with VCL
#
# Listen on port 80, administration on localhost:6082, and forward to
# one content server selected by the vcl file, based on the request. Use a
# fixed-size cache file.
#
# Note: you must replace "example.org" with the outside IP address of your server
# - this is the address at which Varnish receives incoming requests.
# $wgSquidServers in MediaWiki's LocalSettings.php will also need to list all addresses for this Varnish cache.
#
DAEMON_OPTS="-a example.org:80 \
-T localhost:6082 \
-f /etc/varnish/default.vcl \
-u varnish -g varnish \
-s file,/var/lib/varnish/varnish_storage.bin,4G"
答案 0 :(得分:29)
您正在寻找的文件是Varnish守护程序配置脚本。如果您使用的是Redhat / RHEL,则可以在/etc/sysconfig/varnish
中找到(通常);如果您使用的是Debian / Ubuntu,则可以/etc/default/varnish
答案 1 :(得分:15)
您需要两个地方进行清漆配置:
/etc/default/varnish
/etc/varnish/default.vcl
答案 2 :(得分:7)
这是在centos linux服务器上
/etc/sysconfig/varnish
/etc/varnish/default.vcl
如果你想把清漆放在apache前面,你还必须更改httpd配置文件以更改端口
/etc/httpd/conf/httpd.conf
来源:How to install and configure Varnish with Apache on Centos 6
答案 3 :(得分:5)
值得注意的是,在编辑后重新加载清漆配置会清除它的缓存。