Search code examples
amazon-web-servicesbitnamihostnameamazon-lightsail

Lightsail Bitnami reboot resets the machine_hostname setting


I have a running AWS Lightsail instance, with bitname and Wordpress running on it. I have assigned it a static IP address. After setting it up I have opened the console and configured the machine_hostname like this:

sudo ./bnconfig --machine_hostname <domain>

After this, the domain now works, and everything operates as expected..... Until the instance reboots. At that time the domain is lost, and I have to perform this again.

Not sure how to prevent this from happening on a reboot?


Solution

  • Bitnami Engineer here,

    If you run the bnconfig tool to configure the domain name in the application, you need to rename the tool so it's not run again when the instance is started/rebooted.

    sudo ./bnconfig --machine_hostname <domain>
    sudo mv ./bnconfig ./bnconfig.disabled
    

    https://docs.bitnami.com/aws/faq/configuration/configure-custom-domain/

    You can also update the WordPress' configuration with your domain (/opt/bitnami/apps/wordpress/htdocs/wp-config.php)

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

    You can learn more about that here

    https://docs.bitnami.com/aws/apps/wordpress/administration/configure-domain/