- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我开始涂 Varnish 有问题。它总是以default-parameters开头,但是我希望varnish监听端口80。看来init-script不会正确运行varnish(start-stop-daemon),然后以defaults运行。如果启动,我的daemon.log会给我来自 Varnish 的源代码。我使用最新的Debian版本8.7,并使用apt-get install varnish安装了它。如果我在没有Init脚本的情况下启动 Varnish ,那么一切都很好:/usr/sbin/varnishd -a:80 -T localhost:6082 -f/etc/varnish/default.vcl -S/etc/varnish/secret -s malloc,256m(作品)
我的配置和日志:
/etc/varnish/default.vcl:
it's default, nothing changed
/etc/default/varnish:
DAEMON_OPTS="-a :80 \
-T localhost:6082 \
-f /etc/varnish/default.vcl \
-S /etc/varnish/secret \
-s malloc,256m"
Start Init-Script
root@albiorix:~# /etc/init.d/varnish start
/var/log/daemon.log:
Feb 2 13:57:13 albiorix systemd[1]: Starting Varnish HTTP accelerator...
Feb 2 13:57:13 albiorix varnishd[24822]: /* ---===### include/vcl.h ###===--- */
Feb 2 13:57:13 albiorix varnishd[24822]: /*
Feb 2 13:57:13 albiorix varnishd[24822]: * NB: This file is machine generated, DO NOT EDIT!
Feb 2 13:57:13 albiorix varnishd[24822]: *
Feb 2 13:57:13 albiorix varnishd[24822]: * Edit and run generate.py instead
Feb 2 13:57:13 albiorix varnishd[24822]: */
Feb 2 13:57:13 albiorix varnishd[24822]: struct vrt_ctx;
Feb 2 13:57:13 albiorix varnishd[24822]: struct req;
Feb 2 13:57:13 albiorix varnishd[24822]: struct busyobj;
Feb 2 13:57:13 albiorix varnishd[24822]: struct ws;
Feb 2 13:57:13 albiorix varnishd[24822]: struct cli;
Feb 2 13:57:13 albiorix varnishd[24822]: struct worker;
Feb 2 13:57:13 albiorix varnishd[24822]: typedef int vcl_init_f(struct cli *);
Feb 2 13:57:13 albiorix varnishd[24822]: typedef void vcl_fini_f(struct cli *);
Feb 2 13:57:13 albiorix varnishd[24822]: typedef int vcl_func_f(const struct vrt_ctx *ctx);
Feb 2 13:57:13 albiorix varnishd[24822]: /* VCL Methods */
Feb 2 13:57:13 albiorix varnishd[24822]: #define VCL_MET_RECV#011#011#011(1U << 1)
Feb 2 13:57:13 albiorix varnishd[24822]: #define VCL_MET_PIPE#011#011#011(1U << 2)
Feb 2 13:57:13 albiorix varnishd[24822]: #define VCL_MET_PASS#011#011#011(1U << 3)
Feb 2 13:57:13 albiorix varnishd[24822]: #define VCL_MET_HASH#011#011#011(1U << 4)
Feb 2 13:57:13 albiorix varnishd[24822]: #define VCL_MET_PURGE#011#011#011(1U << 5)
Feb 2 13:57:13 albiorix varnishd[24822]: #define VCL_MET_MISS#011#011#011(1U << 6)
Feb 2 13:57:13 albiorix varnishd[24822]: #define VCL_MET_HIT#011#011#011(1U << 7)
Feb 2 13:57:13 albiorix varnishd[24822]: #define VCL_MET_DELIVER#011#011#011(1U << 8)
Feb 2 13:57:13 albiorix varnishd[24822]: #define VCL_MET_SYNTH#011#011#011(1U << 9)
Feb 2 13:57:13 albiorix varnishd[24822]: #define VCL_MET_BACKEND_FETCH#011#011(1U << 10)
Feb 2 13:57:13 albiorix varnishd[24822]: #define VCL_MET_BACKEND_RESPONSE#011(1U << 11)
...
Feb 2 13:57:13 albiorix varnishd[24822]: static struct director#011*directors[2];
Feb 2 13:57:13 albiorix varnishd[24822]: const struct VCL_conf VCL_conf = {
Feb 2 13:57:13 albiorix varnishd[24822]: .magic = VCL_CONF_MAGIC,
Feb 2 13:57:13 albiorix varnishd[24822]: .init_vcl = VGC_Init,
Feb 2 13:57:13 albiorix varnishd[24822]: .fini_vcl = VGC_Fini,
Feb 2 13:57:13 albiorix varnishd[24822]: .ndirector = 2,
Feb 2 13:57:13 albiorix varnishd[24822]: .director = directors,
Feb 2 13:57:13 albiorix varnishd[24822]: .ref = VGC_ref,
Feb 2 13:57:13 albiorix varnishd[24822]: .nref = VGC_NREFS,
Feb 2 13:57:13 albiorix varnishd[24822]: .nsrc = 2,
Feb 2 13:57:13 albiorix varnishd[24822]: .srcname = srcname,
Feb 2 13:57:13 albiorix varnishd[24822]: .srcbody = srcbody,
Feb 2 13:57:13 albiorix varnishd[24822]: .recv_func = VGC_function_vcl_recv,
Feb 2 13:57:13 albiorix varnishd[24822]: .pipe_func = VGC_function_vcl_pipe,
Feb 2 13:57:13 albiorix varnishd[24822]: .pass_func = VGC_function_vcl_pass,
Feb 2 13:57:13 albiorix varnishd[24822]: .hash_func = VGC_function_vcl_hash,
Feb 2 13:57:13 albiorix varnishd[24822]: .purge_func = VGC_function_vcl_purge,
Feb 2 13:57:13 albiorix varnishd[24822]: .miss_func = VGC_function_vcl_miss,
Feb 2 13:57:13 albiorix varnishd[24822]: .hit_func = VGC_function_vcl_hit,
Feb 2 13:57:13 albiorix varnishd[24822]: .deliver_func = VGC_function_vcl_deliver,
Feb 2 13:57:13 albiorix varnishd[24822]: .synth_func = VGC_function_vcl_synth,
Feb 2 13:57:13 albiorix varnishd[24822]: .backend_fetch_func = VGC_function_vcl_backend_fetch,
Feb 2 13:57:13 albiorix varnishd[24822]: .backend_response_func = VGC_function_vcl_backend_response,
Feb 2 13:57:13 albiorix varnishd[24822]: .backend_error_func = VGC_function_vcl_backend_error,
Feb 2 13:57:13 albiorix varnishd[24822]: .init_func = VGC_function_vcl_init,
Feb 2 13:57:13 albiorix varnishd[24822]: .fini_func = VGC_function_vcl_fini,
Feb 2 13:57:13 albiorix varnishd[24822]: };
Feb 2 13:57:14 albiorix systemd[1]: Started Varnish HTTP accelerator.
(1177 lines)
processes (ps ax):
24351 ? SLs 0:00 /usr/sbin/varnishd -a :6081 -T localhost:6082 -f /etc/varnish/default.vcl -S /etc/varnish/secret -s malloc,256m
24352 ? Sl 0:00 /usr/sbin/varnishd -a :6081 -T localhost:6082 -f /etc/varnish/default.vcl -S /etc/varnish/secret -s malloc,256m
root@albiorix:~# varnishd -V
varnishd (varnish-4.0.2 revision bfe7cd1)
Copyright (c) 2006 Verdens Gang AS
Copyright (c) 2006-2014 Varnish Software AS
最佳答案
config/etc/default/varnish在debian 8中不再与systemd一起使用。
编辑此文件:/lib/systemd/system/varnish.service
重新加载systemd:systemctl守护程序重新加载
重新启动 Varnish :systemd重新启动varnish.service
享受
关于apache - Varnish 无法正确启动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42003632/
我一生都找不到有关 Varnish (版本 3)对象可能属性的任何文档。 我们知道(从谷歌搜索中,varnish 文档只是咕哝,让你更加沮丧)例如,请求对象具有 url 属性(req.url),并且它
我们公司最近决定开始使用 Varnish HTTP 加速器。我们选择这个解决方案的最重要原因是因为我们是一家专门构建网络商店的公司 (Magento Enterprise) => Magento 有一
我们最近将Varnish放在了Drupal的前面,因为服务器承受着沉重的负担,总体而言,我们感到非常满意。 剩下的唯一问题是,有时我们在缓存的数据中会有一个无限的重定向循环。我们通过HTTP监控发现了
我正在设置连接到2个后端服务器(Magento 2应用程序)的Varnish 5实例。 我正在使用新的Varnish 5功能来加载多个VCL文件。为了使事情现在变得非常简单,我将在示例中使用1个后端服
我有一台 Vanilla 的Debian DigitalOcean机器,我正在尝试遵循《 Varnish 书》中的“开发人员”类(class)。我必须the first exercise, Insta
我已经为我的网站配置了Varnish,并且由于网站性能出色,但是没有人知道有任何Varnish监视工具可以查看Varnish中存储的内容以及与Memcached或APC监视工具类似的东西。 谢谢, -
我正在寻找 Varnish 高可用性设置的最佳设置。 具有多个 Varnish 实例的标准设置,每个实例都有自己的缓存存储,因此每个实例都在后端执行自己的请求。 即使使用 Varnish_Storag
我已经经历了这个 article 。有人可以帮我澄清以下有关 Varnish 各种日志位置的疑问吗? 根据 varnish 电子书 varnishncsa -显示 Varnish 访问日志和 varn
在不停机的情况下以编程方式向 Varnish director 添加或删除单个后端服务器的最佳方法是什么?我一直在寻找这方面的一个很好的例子,但找不到。 我希望能够根据需要扩展和缩减我的后端服务器。
我已经安装了 Apache 和 Tomcat,想在它们前面安装 Varnish,静态到 Apache,动态到 Tomcat(所有/static/* url 到 Apache,应该由 Varnish 缓
我目前正在做一个基于 Varnish 的项目。 我们写 vcl和 vmod .但是项目需要检查请求体。 如何在 VCL 中获取帖子请求正文或 vmod与 C function ? 最佳答案 你几乎可以
我习惯跑 varnishadm -T localhost:6082 debug.health 检查后端健康状态,但如何详细检查探测失败的原因(例如超时、错误的 http 状态代码)? 最佳答案 在 V
我正在尝试设置我的第一个 Varnish 缓存服务器,我有几个问题想问任何有经验的人。 1.) 我将 Varnish 作为独立服务器运行。我还需要在同一台服务器上安装 Apache 吗?最终,Varn
抱歉,我是 Varnish 的新手。 我正在我的 /etc/varnish/mysite.vlc 中尝试一堆东西,但无法让它工作。 我想将特定网址重定向到另一个网址。例子:如果有人访问 http://
我有这个: if (bereq.http.X-Path ~ "[a-z0-9]+\.(js|css)$") { set beresp.http.Cache-Control =
我想将Varnish用作“智能”代理,并且几乎可以正常工作。这个想法是,某些请求应通过Varnish传递,到达后端并返回,所有其他请求应返回“synt”消息,表明特定响应不包含任何结果。 这与Varn
我们将Varnish Cache用作许多客户的前端,并在任何后端出现问题时通过宽限期处理过时的内容。 我们现在确实有一个失败的后端,并且我们想增加宽限期(在生病的时候),这可能吗?我尝试在文档中进行挖
我们想要建立一个 Varnish 级联,以便我们进行1级和2级缓存。这意味着应要求 -1级 Varnish 的工艺和路线 -通往的 Varnish 等级2 - 应用 问题:如果应用程序现在在内容中添加
我在vcl中使用循环导演。我想查看所有缓存未命中URL和后端IP。现在在做sudo varnishtop -i BereqURL它只显示网址而不是后端IP的去向 54.42 BereqURL
是否可以设置 Varnish 以定期重建整个 field ?我在 Varnish 后面有一个播放应用程序。该应用程序生成了超过2,000页的网站号,其中大多数是产品页。是否可以将Varnish设置为从
我是一名优秀的程序员,十分优秀!