Azure/Moodle

HTTP 301 redirection exposing internal azure URL, change siteURL?

Closed this issue · 1 comments

Is it possible to change the value of the siteURL or loadbalancerURL after the deployment?

My custom domain has a CNAME to azure moodle installation, but the browser gets an HTTP 301/302 redirection exposing the azure internal URL e.g. lb-myapp...cloudapp.azure.com.

If I change /etc/nginx/sites-enabled/lb-myapp...cloudapp.azure.com.conf from server_name to my domain name will that work?

server {
        listen 81 default;
        server_name lb-myapp....cloudapp.azure.com;
        ...

to

server {
        listen 81 default;
        server_name www.mydomain.com;
        ...

or is there any other way to resolve this issue?

ps server_name is specified by ${siteFQDN} variable in scripts/setup_webserver.sh script

I managed to resolve the issue by updating /moodle/html/moodle/config.php $CFG->wwwroot parameter, it's default value was pointing at lb-myapp....cloudapp.azure.com.