Change Hostname of Azure VM Moodle Instance

Keywords: Moodle - Microsoft Azure - How to - Domain Name (DNS)
I am trying to update the hostname of my Moodle instance (on a VM in Azure), using the instructions here:

Unfortunately, configure_app_domain is not found, and neither is bnconfig.

I have made no changes to the VM itself, this is the Bitnami image installed today (22nd September 2020). So no changes made to files, permissions, or anything else.

Also bear in mind that I am using a CNAME record to map a subdomain I own to the specific Azure VM hostname (which is … I don’t want to map using IP address using hosts file - every time I reset the VM the IP will change. I want to change the hostname only.

Any advice on how to proceed? Thanks

Hi @aricwhitewood,

For Moodle it is not needed to modify the hostname. We will change the documentation regarding this issue.


Hi - I’d like to map a domain (or subdomain) to my moodle VM. So basically let’s say my subdomain is and the azure DNS name is

I want the moodle instance to load with the url

I’ve added a CNAME record mapping the first to the second with my domain provider.

What should I do to make this work on the moodle side though? I have done a lot of iterations over the last few days changing wwwroot in the config file, etc. but it didn’t work in the end. And as mentioned the suggested configuration scripts are not found.

Please advise

Hi @aricwhitewood,

If you already have a CNAME pointing to the Azure’s DNS, you should be able to access the application using, there is no other change required. Did you find any issue when doing that?

You can confirm if the DNS is configured properly using this online tool

Yes I did experience an issue - changing the domain on my hosting provider is fine. Connecting to the site via the new domain shows an error - basically the site refuses to connect - because there is a mismatch in the moodle config file.

I’ve already looked this up and moodle config has to be changed, specifically the wwwroot CFG variable, as described here:

which is what I have tried already and that didn’t work - see previous messages from me - including trying to run the bitnami change app domain script which isn’t found.

Hi @aricwhitewood,

We have a Support Tool that will gather relevant information for us to analyze your configuration and logs. Could you please execute it on the machine where the stack is running by following the steps described in the guide below?

Please note that you need to paste the code ID that is shown at the end.


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.