Adding a Domain Name

Adding a Domain Name

by Jason Martinez -
Number of replies: 3

Hi,

I am in the process of adding a fully qualified domain name to access moodle from the outside.

Moodle version 2.6.1

Current setup is that I have a public IP already setup, configured and working for moodle. Users access it from the outside.

example: http://215.86.20.131/moodle  

Can I just create in my DNS an entry of www.moodlesite.com pointing to 215.86.20.131?  Or Do I really have to change the config.php 

$CFG->wwwroot = 'http://215.86.20.131/moodle';  to: $CFG->wwwroot = 'http://www.moodlesite.com/moodle'; ?  and run the replace.php, etc. etc?

 

 

Thanks

Jason

-It's the small things that make the difference

Average of ratings: -
In reply to Jason Martinez

Re: Adding a Domain Name

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

You *really* have to change config.php and run the replace.php. Your users will get an error message and it will flip back to the IP version otherwise. 

Take a backup before you run replace.php

In reply to Howard Miller

Re: Adding a Domain Name

by Jason Martinez -

Thanks for the clarification Howard.

I will do that.

Jason

-I'ts the small things that make the difference

In reply to Howard Miller

Adding a Domain Name (URL) to a Moodle LMS

by John Moore -

To update the Moodle URL (domain Name) from an IP address number to a GoDaddy domain do the following:


  1. Point GoDaddy (or where you bought your URL) DNS to Digital Ocean/Linode/AWS.


      2. change config.php to:


             $CFG- >wwwroot = ‘http://domian.com’:

       

             And upload the config.php file to /var/www/html/moodle


      3. Restart Apache server:


             sudo service apache2 restart


      4. Update the Moodle Link files and Moodle Database. Here is how:


             http://www.inmotionhosting.com/support/edu/moodle/advanced-tutorials/change-url

-----