Have you tried using your backup snapshot and duplicating your website to do some testing, upgrading, or configuration but instead of showing your website you get the default Apache2 Ubuntu page?
Please keep in mind that this problem only occurs when the Apache2 package is installed from system repositories.
We don’t need an Apache2 package in Bitnami. Why? because they have a custom package installed and running within the stack. When a Bitnami server is rebooted or stopped/started, the newly installed apache service will be the first to start. This apache’s document root is /var/www/html/, which contains the default index.html file. The Apache default page will be displayed. Because the socket/port 80 is already in use by the default Apache, the bitnami scripts will fail to start the Apache service.
To fix this, you need to ssh into your AWS Lightsail instance and disable the Apache2 service. When you reboot or stop and start the instance, Bitnami’s Apache service will start properly. Kindly follow the steps below.
- Run the following commands to stop the Apache2 service:
sudo systemctl stop apache2 sudo pkill -f apache
- Run the following command to start Bitnami’s Apache service
sudo /opt/bitnami/ctlscript.sh restart
3. And then run the following command to prevent the Apache2 service from starting on boot:
sudo systemctl disable apache2
Then press CTRL + F5 to reload your website again.