简体   繁体   English

Varnish Apache 集成到 503 后端提取在 MAC 中失败

[英]Varnish Apache Integration going to 503 Backend fetch failed in MAC

I tried to setup varnish on MAC for apache2(MAMP) using below steps我尝试使用以下步骤在 MAC 上为 apache2(MAMP) 设置清漆

Step1.第1步。 brew install varnish酿造安装清漆

Step2.第2步。 Varnished installed then configured default.vcl Varnished 安装然后配置 default.vcl

backend default {
    .host = "localhost";
    .port = "80";
    .first_byte_timeout = 600s;
    .probe = {
        .url = "/pub/health_check.php";
        .timeout = 2s;
        .interval = 5s;
        .window = 10;
        .threshold = 5;
   }
}

Step3.第三步。 configured apache2 to run on port 8080配置 apache2 在端口 8080 上运行

NameVirtualHost *:8080

<VirtualHost *:8080>

</virtualHost>

Step4.第四步。 running 127.0.0.1 or localhost give below error运行 127.0.0.1 或本地主机给出以下错误

Error 503 Backend fetch failed
Backend fetch failed

Guru Meditation:
XID: 20

Varnish cache server

Can anyone please tell me what step I am missing here.谁能告诉我我在这里缺少哪一步。

Thanks谢谢

I addressed a similar issue here: https://magento.stackexchange.com/questions/363095/magento2-4-5-varnish-alway-so-503-backend-fetch-fail/我在这里解决了类似的问题: https://magento.stackexchange.com/questions/363095/magento2-4-5-varnish-alway-so-503-backend-fetch-fail/

It describes the following aspects:它描述了以下几个方面:

  • Changing the health check URL to /healt_check.php for recent versions of Magento对于/healt_check.php的最新版本,将健康检查 URL 更改为 /healt_check.php
  • Check the current backend health检查当前后端运行状况
  • Debugging the output of the health check调试健康检查的output
  • Considering that the health check might timeout after 2 seconds考虑到健康检查可能会在 2 秒后超时

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM