簡體   English   中英

無緩存:清漆年齡0

[英]No cache: Varnish age 0

嗨,我在網絡服務器上安裝了Varnish 4.0.3。

FreeBSD 10.2 amd64 apache24 php56 mysql56

好的,一切都很好。 所有工作都很完美。

但是我只有一個問題,我認為cookie中的清漆緩存。

當我安裝varnish時,他沒有為我創建任何配置文件。 僅在/usr/local/etc/rc.d/varnishd中

這是清漆的:

 . /etc/rc.subr name=varnishd rcvar=varnishd_enable load_rc_config ${name} : ${varnishd_enable:=YES} : ${varnishd_pidfile=/var/run/${name}.pid} : ${varnishd_listen=:80} : ${varnishd_admin=localhost:81} : ${varnishd_backend=127.0.0.1:8080} : ${varnishd_storage=file,/tmp,100M} : ${varnishd_hash=classic,16383} : ${varnishd_user=www} : ${varnishd_group=www} command="/usr/local/sbin/${name}" pidfile="${varnishd_pidfile}" if [ -n "${varnishd_config}" ] ; then : ${varnishd_flags:="-P ${varnishd_pidfile} -a ${varnishd_listen} -T ${varnishd_admin} -f ${varnishd_config} -s ${varnishd_storage} -h ${varnishd_hash} -u ${varnishd_user} -g ${varnishd_group} ${varnishd_extra_flags}"} else : ${varnishd_flags:="-P ${varnishd_pidfile} -a ${varnishd_listen} -T ${varnishd_admin} -b ${varnishd_backend} -s ${varnishd_storage} -h ${varnishd_hash} -u ${varnishd_user} -g ${varnishd_group} ${varnishd_extra_flags}"} fi unset varnishd_user unset varnishd_group run_rc_command "$1" 

我配置好之后就配置好了。 但是年齡是0。

我的問題是如何阻止cookie緩存? 我沒有配置文件。

http://www.isvarnishworking.com/這是我的網站: http : //pvpgamers.net/

您閱讀過Varnish文檔嗎?

您可以從內置VCL開始自己的配置。 您可以在/usr/local/share/doc/varnish/builtin.vcl中找到它們(如果我錯了,請參考pkg info -l varnish4輸出)。

然后,將varnishd_config="/path/to/your/configuration"到/etc/rc.conf中(並重新啟動Varnish或重新加載您的配置)。

我的問題是如何阻止cookie緩存?

年齡:0表示未緩存該頁面(未命中)。 默認情況下,當存在任何cookie時,Varnish不會緩存:

if (req.http.Authorization || req.http.Cookie) {
    /* Not cacheable by default */
    return (pass);
}

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM