Localhost

Jump to: navigation, search

Note: You are currently viewing documentation for Moodle 2.0. Up-to-date documentation for the latest stable version is available here: Localhost.

A localhost means "this computer" in a network. In Moodle documentation, a localhost refers to a web server with Moodle, which is installed on a computer that is not connected to the internet.

In [techie] talk   
  " A localhost is a Internet Protocol loopback device which can be used by 
    TCP/IP applications  to talk to themselves."

The default internal loop IP for the localhost is usually 127.0.0.1 . This IP is different from the IP that identifies the computer on the network.

Reaching a localhost

After unpacking one of Moodle's Complete install packages for Windows on a Windows machine, the user is instructed to open up a web browser and type "localhost" in the address bar. This brings up the first time install script for Moodle.

Every time the localhost is used, it is a good idea to check to see if it is has been turned on. Usually this involves running the Apache and the MySQL startup scripts.

Once these scripts are running, then the user will type "localhost", or 127.0.0.1 in the browser address field. Alternatively, many users have a "favorite" or link with either of these two addresses.

Using a complete install package on an internal network

By changing a few lines of code in a few files, a "localhost" (one computer) webserver sometimes can be changed to be seen by other computers. Generally speaking, this should only be attempted on an internal (where computers share a single router) network.

For example, a teacher might have one computer in the classroom initially set up as a localhost with a Moodle on it. The 5 other computers students use as workstations can see that Moodle if they are on the same network. The students need to know the Moodle computer's network IP address and type that in their address bar of their browser. However, students will not be able to use it from home.

Localhost servers and the internet

A common questions is why a Moodle installed on my computer can can not be used by other people on the internet. Please see: Home servers and the internet.

Uses of localhost servers

Localhosts are great for testing things or building courses for later upload to an more secure Moodle site that can be seen from the web. It is possible to install a complete install package on your personal computer and make it available to others on a small network, such as a classroom. Most personal computers that have a complete install package (with its webserver) will not be configured to be visible from the internet.

See also