I have followed the below link and added authentication for Bitnami Magento 2.3.2 development site which is in AWS Lightsail.


I have created htpasswd and magento_users using,

cd /opt/bitnami
apache2/bin/htpasswd -cb apache2/magento_users USERNAME PASSWORD```

Also I have added the below code in /opt/bitnami/apps/magento/conf/httpd-app.conf

<Directory "/opt/bitnami/apps/magento/htdocs">
AuthType Basic
AuthName MyAuthName
AuthUserFile "/opt/bitnami/apache2/magento_users"
Require valid-user
<IfVersion >= 2.3>
# Require all granted

After I have restarted the apache and flushed the cache, It asked for username and password when loading dev frontend. When I provide credentials, it end up getting error as,

Error 503 Backend fetch failed
Backend fetch failed

Guru Meditation:
XID: 393256

Varnish cache server

I can't see anything related to this in Apache error_log.

Can anyone please help me out to fix this issue.

1 Answer 1


you probably have issues with this block in varnish config:

.probe = {
        .url = "/pub/health_check.php";
        .timeout = 2s;
        .interval = 5s;
        .window = 10;
        .threshold = 5;    

your health_check.php served from pub/ directory already. another issue that probe time settings were too small and you have sick backend.

you can fix path, extend timings, or remove probe.

check backend status:

varnishadm backend.list

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.