General help

changing from an IP address to a domain name

Picture of Ken Task
Re: changing from an IP address to a domain name
Particularly helpful Moodlers

First, info about 'localhost'.  Typically, on all machines, localhost is pointed to (the loopback IP address of every computer on the net).  Even your current workstation thinks localhost is equal to  One cannot reach a server using http://localhost from another workstation/computer.   A meant-for-development-locally installed Moodle is set to work with localhost only.
You can use the browser on the same machine to access, but cannot access it via any other computer/device on your home network.   Got another computer or handheld/smartphone on your wifi?  Try going to http://localhost and see what happens.   Uhhh, I can tell ya … nothing but an error and you won't see any Moodle. ;)

Attempting to go to one gets a screen that says:


   Site Not Published                                                                           
   The site you are looking for has not been published                                          
   If you are the owner of the site, you can fix this message by publishing your site to        
   this address.
So it looks to be an apache config issue.  Whatever tool/control panel the hosting folks have given you, use that to 'publish'

Also, the supposed 'short-cut' URL,
does get to Moodle then flips to IP address.  That's because Moodle is an app and the configuration of Moodle now takes over (briefly) … but, due to 'not published site', Apache overrides Moodle and you get IP address/moodle.  Apache is redirecting every click.

Find your apache2.conf on the server and the line that points to document root.
The Moodle folder should be in the document root.
The data folder for Moodle could be anywhere but typically up one level from document root.
But, it could be anywhere the apache user is setup to read/write to it.

Hey, TCSA!!!  Small world … am in Tx. as well!

'spirit of sharing', Ken

Average of ratings: -
Picture of Rick Barkley
Re: changing from an IP address to a domain name

Thanks Ken!  It is a small world indeed!  I will work on it this evening and see if I can get everything resolved. 

thanks again!

Average of ratings: -
Picture of winlux wini
Re: changing from an IP address to a domain name

I just changed my moodle installation from online hosting that worked perfectly, albeit extremely slow. I wanted to have a better user experience for customers and ended up switching to a server that ishosted on premises.

I to get the problem that is described here, but in my case I pointed the DNS to my ip. Moodle is set to my public ip and as a result, the domain name does not display.

When I set the DNS to point to my IP, I could change only the A record. The problem is not as described apache based. When I did a reverse lookup on the ip, it reads the reverse from the ISP DNS. This means that moodle relies heavily on the ability to inerpret reverse DNS.

In my case I cannot change the PTR. If you have this ability, change a PTR to point to your domain and it should work fine.

If others have some more suggestions please add, I would love to know a work around to this as well.

Average of ratings: -