{"id":6584,"date":"2022-12-03T17:00:08","date_gmt":"2022-12-03T08:00:08","guid":{"rendered":"https:\/\/the-world-star.com\/?p=6584"},"modified":"2026-11-17T21:32:56","modified_gmt":"2026-11-17T12:32:56","slug":"fixing-a-broken-bitnami-web-server-on-aws-lightsail","status":"publish","type":"post","link":"https:\/\/the-world-star.com\/en\/server\/fixing-a-broken-bitnami-web-server-on-aws-lightsail-6584\/","title":{"rendered":"Fixing a Broken Bitnami Web Server on AWS Lightsail"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">The symptoms were:<br>The site was completely dead with errors like \"Unable to connect.\" This was probably because I was trying to access it via HTTPS. When accessing it directly via the IP address, the default post-installation landing page showed up instead. It took me an absurd amount of time to resolve this (a solid half-day).<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The Cause<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">While fumbling around trying to install Let's Encrypt, I must have installed something that automatically pulled in the standard `apache2` package. Then, after a reboot, the system launched the standard Apache instead of the Bitnami-managed one, showing its default welcome page. This is the classic annoyance of Bitnami: you should never carelessly run `apt install apache2` or related tools.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The Solution<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">I eventually found the official documentation. Since it took me half a day just to track this down and I thought it might take even longer, I actually spun up a brand-new Lightsail instance to rebuild it first.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/aws.amazon.com\/jp\/premiumsupport\/knowledge-center\/lightsail-troubleshoot-default-webpage\/\">https:\/\/aws.amazon.com\/premiumsupport\/knowledge-center\/lightsail-troubleshoot-default-webpage\/<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Stop the system Apache2 service:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">sudo systemctl stop apache2<br>sudo pkill -f apache<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Start the Bitnami Apache service:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">sudo \/opt\/bitnami\/ctlscript.sh restart<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Disable the system Apache2 service from starting on boot:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">sudo systemctl disable apache2<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What I Discovered Right Before Finding the Fix<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Commands like `\/opt\/bitnami\/ctrlscript.sh restart apache2` kept failing with \"Failed...\".<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Because the wrong page was rendering, I spent ages investigating the DocumentRoot settings, but couldn't figure it out.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Checking the processes with the `ps` command on the newly recreated Lightsail instance, I saw that the correct, healthy server was running the Bitnami `httpd` process:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\/opt\/bitnami\/apache2\/conf\/httpd.conf    documentRoot \"\/opt\/bitnami\/apache\/htdocs\"<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In contrast, on the broken, inaccessible server, standard `apache2` was running. That was the huge difference.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I struggled for a bit because standard `apache2` kept resurrecting itself even after being killed, but somehow I managed to get it to stay down.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The symptoms were:The site was completely dead with errors like \"Unable to connect.\" This was probably because I was trying to access it via HTTPS. When accessing it directly via the IP address, the default post-installation landing page showed up instead. It took me an absurd amount of time to resolve this (a solid half-day). [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2606,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_locale":"en_US","_original_post":"https:\/\/175.41.248.22\/?p=4082","_lightning_design_setting":{"layout":"default"},"footnotes":""},"categories":[3],"tags":[339,1149,1150,67,337],"class_list":["post-6584","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-bitnami","tag-lets-encrypt","tag-web-server","tag-server","tag-lightsail","en-US"],"_links":{"self":[{"href":"https:\/\/the-world-star.com\/wp-json\/wp\/v2\/posts\/6584","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/the-world-star.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/the-world-star.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/the-world-star.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/the-world-star.com\/wp-json\/wp\/v2\/comments?post=6584"}],"version-history":[{"count":1,"href":"https:\/\/the-world-star.com\/wp-json\/wp\/v2\/posts\/6584\/revisions"}],"predecessor-version":[{"id":6585,"href":"https:\/\/the-world-star.com\/wp-json\/wp\/v2\/posts\/6584\/revisions\/6585"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/the-world-star.com\/wp-json\/wp\/v2\/media\/2606"}],"wp:attachment":[{"href":"https:\/\/the-world-star.com\/wp-json\/wp\/v2\/media?parent=6584"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/the-world-star.com\/wp-json\/wp\/v2\/categories?post=6584"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/the-world-star.com\/wp-json\/wp\/v2\/tags?post=6584"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}