Why is my webpage on a Bitnami-hosted Lightsail instance loading the Apache default page instead of my website after an instance stop and start or reboot?

2 minute read

I restarted my Bitnami-hosted Amazon Lightsail instance and now my website is loading the Apache default page instead of my website. How do I fix this?

Short description

Bitnami-hosted instances have their own web service, such as Apache, NGINX, and so on, pre-configured inside their stack on port 80. If you install the Apache2 package (using commands such as apt install apache2), this new Apache2 service starts first after an instance reboot or stop and start. Also, the Apache2 package might be installed as a dependency when you install packages such as python-certbot-apache.

Because the new Apache2 service has already started and is listening on port 80, the Apache service provided by Bitnami can't start and listen on the same port. This is why the website loads the default Apache page from /var/www/html/index.html as it is the document root of the Apache2 service.


Stop the Apache2 service and prevent it from starting on boot. By doing this, Bitnami's Apache service starts correctly when you reboot or stop and start the instance.

1.    Run the following commands to stop the Apache2 service:

sudo systemctl stop apache2
sudo pkill -f apache

2.    Run the following command to start Bitnami's Apache service:

sudo /opt/bitnami/ctlscript.sh restart

3.    Run the following command to prevent the Apache2 service from starting on boot:

sudo systemctl disable apache2

AWS OFFICIALUpdated 2 years ago