错误 503 后端获取失败,当我将域指向 IP

Error 503 Backend fetch failed, when I pointed the domain to the IP

我正在使用 amazon lightsail,我正在使用 bitnami 来部署 magento 2.3.1 和最新版本的 wordpress。安装很顺利,都可以通过IP地址访问

我按照官方亚马逊文档将域添加到 lightsail,如 this,varnish 开始出现错误 "Error 503 Backend fetch failed"

This is where magento is installed. This是安装博客的地方

两者均由 bitnami 提供支持,但在我添加域名时均出现故障。

我尝试重新启动 vanish 和所有 bitnami 服务,我尝试重新启动 lig​​htsail 实例。许多人说要禁用消失,除非没有其他解决方案,否则我不想这样做。重新创建实例是可能的,但我怀疑它能解决任何问题。

您需要在/opt/bitnami/apps/wordpress/htdocs/wp-config.php

更新Wordpress域名

改变

define('WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST'] . '/');
define('WP_HOME', 'http://' . $_SERVER['HTTP_HOST'] . '/');

define('WP_SITEURL', 'http://DOMAIN/');
define('WP_HOME', 'http://DOMAIN/');

对于 Magento,您需要更新主机名:

sudo /opt/bitnami/apps/magento/bnconfig --machine_hostname NEW_DOMAIN