Lightsail Bitnami 重新启动会重置 machine_hostname 设置
Lightsail Bitnami reboot resets the machine_hostname setting
我有一个 运行 AWS Lightsail 实例,上面有 bitname 和 Wordpress 运行。
我给它分配了一个静态IP地址。
设置完成后,我打开了控制台并像这样配置了 machine_hostname:
sudo ./bnconfig --machine_hostname <domain>
在此之后,域现在可以正常工作,并且一切都按预期运行......直到实例重新启动。那个时候域名就丢了,只好再执行一次
不确定如何防止这种情况在重启时发生?
这对我有用:
sudo hostnamectl set-hostname <domain>
这里是 Bitnami 工程师,
如果您运行在应用程序中配置域名的bnconfig工具,当实例为started/rebooted时,您需要重命名该工具以使其不再运行。
sudo ./bnconfig --machine_hostname <domain>
sudo mv ./bnconfig ./bnconfig.disabled
https://docs.bitnami.com/aws/faq/configuration/configure-custom-domain/
您还可以使用您的域更新 WordPress 配置 (/opt/bitnami/apps/wordpress/htdocs/wp-config.php)
define('WP_SITEURL', 'http://DOMAIN/');
define('WP_HOME', 'http://DOMAIN/');
您可以在此处了解更多信息
https://docs.bitnami.com/aws/apps/wordpress/administration/configure-domain/
我有一个 运行 AWS Lightsail 实例,上面有 bitname 和 Wordpress 运行。 我给它分配了一个静态IP地址。 设置完成后,我打开了控制台并像这样配置了 machine_hostname:
sudo ./bnconfig --machine_hostname <domain>
在此之后,域现在可以正常工作,并且一切都按预期运行......直到实例重新启动。那个时候域名就丢了,只好再执行一次
不确定如何防止这种情况在重启时发生?
这对我有用:
sudo hostnamectl set-hostname <domain>
这里是 Bitnami 工程师,
如果您运行在应用程序中配置域名的bnconfig工具,当实例为started/rebooted时,您需要重命名该工具以使其不再运行。
sudo ./bnconfig --machine_hostname <domain>
sudo mv ./bnconfig ./bnconfig.disabled
https://docs.bitnami.com/aws/faq/configuration/configure-custom-domain/
您还可以使用您的域更新 WordPress 配置 (/opt/bitnami/apps/wordpress/htdocs/wp-config.php)
define('WP_SITEURL', 'http://DOMAIN/');
define('WP_HOME', 'http://DOMAIN/');
您可以在此处了解更多信息
https://docs.bitnami.com/aws/apps/wordpress/administration/configure-domain/