2012-02-23 87 views
8

我刚刚安装了清漆并准备好提供网页。清漆配置文件在哪里?

问题是我们正在打开文件限制。
我们已经为清漆用户设置了ulimit

我们想要找到一个文件,我们可以这样写配置:

# 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" 

回答

27

你要找的文件是光油守护程序配置脚本。您可以在/etc/sysconfig/varnish发现这个(通常情况下),如果你在Redhat/RHEL或/etc/default/varnish如果你在Debian/Ubuntu的

+0

不......我们不能在这个文件中写上面的配置...... – 2012-02-23 22:21:11

+1

看一下,看看你能在'/ etc/defaults'或'/ etc/sysc中看到清漆文件onfig'。这似乎是你正在寻找的文件。 – qweet 2012-02-23 22:24:27

+0

no ...我使用tarball安装了清漆 – 2012-02-23 23:21:21

14

有两个地方,你需要做漆配置:

  1. /etc/default/varnish
  2. /etc/varnish/default.vcl
+0

第二个路径可能不同,但是如果它在第一个文件中定义,那么就从那里开始搜索。 – gnysek 2015-06-24 09:28:43

5

这也是值得注意的是,重装清漆配置编辑将其清除缓存后。