bitnamicanvas-lms

File download URL is changed to local IP address from public IP address in Bitnami Canvas LMS


I have installed Bitnami canvas LMS following the steps in the Url https://bitnami.com/stack/canvaslms/virtual-machine

The installed LMS is working fine when I am in my local computer and I am accessing the portal with the Url http://192.168.1.141. I have tried to download a file in this instance using the Url http://192.168.2.141/files/2/download?download_frd=1 and the file is downloaded successfully.

I have to expose this instance to the public and for that, I have done port forwarding in my router to this computer. After port forwarding, I can open the Canvas instance using my public IP address. But at this time I have a problem and the problem is that when I click on a file, I am unable to download the file.

It's because when I click on the public IP address, the URL is converted to my local IP address and the file never gets downloaded.

My public Url of the file to download: http://Public-IP:1000/files/2/download?download_frd=1

Url changed to local IP in the browser: http://192.168.2.141/files/2/download?download_frd=1&sf_verifier=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJ1c2VyX2lkIjoiMTAwMDAwMDAwMDAwMDEiLCJyb290X2FjY291bnRfaWQiOiIxMDAwMDAwMDAwMDAwMSIsIm9hdXRoX2hvc3QiOiIyLjEwOS41MC4yMjozMDAwIiwiZXhwIjoxNTUzNTEzOTA2fQ.nip1yOlvRSvoC5TeC_WnqQsKeqfU5AZIG_aUcCAgRsAHlmG9z3x6oQMBKmVBDQYL1jocEyfuhzK44QWFWSwAbQ

I think I am missing some Url configuration but I don't know what to do. Please help me.


Solution

  • I have fixed the issue by configuring hostname according to the below link. https://docs.bitnami.com/bch/apps/canvaslms/administration/update-ip-hostname/

    sudo opt/bitnami/apps/canvaslms/bnconfig --machine_hostname public IP or domain name:1000

    sudo opt/bitnami/ctlscript.sh restart