2012-02-23 82 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

這也是值得注意的是,重裝清漆配置編輯將其清除緩存後。