Phabricator.base-uri overwritten after each reset

This is regarding the virtual machine version of Phabricator (20150108).

I am finding that after each system restart, the value I set for phabricator.base-uri gets overwritten with the ip of the server (eg. overwritten to “http://192.168.162.125” instead of “http://newhostname.com” as set before).

I am trying to set up dynamic dns on the server and followed the instructions at Bitnami change hostname instructions to set the new hostname. After running the commands below

$ installdir/apps/phabricator/bnconfig --machine_hostname NEW_HOSTNAME

$ installdir/apps/phabricator/htdocs/bin/config set phabricator.base-uri NEW_HOSTNAME

I can access the site fine through the new hostname that was set up.

However after restarting the server through either

/opt/bitnami/ctlscript.sh restart
Edit:
I was wrong earlier. The above command does not overwrite the value of phabricator.base-uri to the local ip.

reboot
Edit: the above command, a system reset, results in phabricator.base-uri getting overwritten with local ip

the local config value phabricator.base-uri gets overwritten each time with the ip of the server (eg. overwritten to “http://192.168.162.125” instead of “http://newhostname.com” as set before). As a result, when I visit http://newhostname.com, Phabricator complains that the specified domain is not configured for Phabricator requests.

If I run

$ installdir/apps/phabricator/htdocs/bin/config set phabricator.base-uri NEW_HOSTNAME

again, I can access the site fine again with the new hostname until the next restart.

Does anybody know what I am doing wrong or at which point the config value gets overwritten after each restart?

In addition, I modified the ServerName value in the apache config in /opt/bitnami/apache2/conf to the new hostname to see if it would help but that did not seem to do anything.

For now, I modified /opt/bitnami/apps/phabricator/scripts/ctl.sh to run the config set command with the new hostname after every start as a temporary fix and that seems to be working okay.

Thanks

Edit: So my modification to /opt/bitnami/apps/phabricator/scripts/ctl.sh is not working as a temporary fix; I am guessing because the phabricator processes are daemonized, my modification is probably running before all the phabricator processes have loaded.

Hi,

We ship the “bnconfig” utility to configure the application properly depending on the IP address or the domain. This is useful if you do not set a custom domain. If you already set (using the bnconfig tool or the Phabricator config tool) you can delete the “bnconfig” tool so the IP will not be changed again after booting it. I will update the Wiki section to clarify this issue.

I hope it helps.

Thank you very much. This solves the issue I was having.

HI @alchestor,

We are glad that it worked for you!