Lynob
Lynob

Reputation: 5327

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

I'm using amazon lightsail, I'm using bitnami to deploy magento 2.3.1 and the latest version of wordpress. The installation went smoothly, both could be accessed from the IP address.

I added the domain to lightsail like this, by following official amazon docs and varnish started giving error "Error 503 Backend fetch failed"

This is where magento is installed. This is where the blog is installed

both powered by bitnami, both went down when I added the domain name.

I tried restarting vanish and all bitnami services, I tried restarting lightsail instance. Many say to disable vanish, I don't want to do that unless there's no other solution. Recreating the instance is possible but I doubt that it would solve anything.

Upvotes: 1

Views: 823

Answers (1)

Michiel d'Hont
Michiel d'Hont

Reputation: 336

You need to update the Wordpress domain name in /opt/bitnami/apps/wordpress/htdocs/wp-config.php

Changing

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

To

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

For Magento, you need to update the hostname:

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

Upvotes: 3

Related Questions