How to Access MOODLE in Intranet and Internet

When Moodle is accessed either in Intranet or internet, there will not be any issue. But occasions when the MOODLE Site has to be accessed both in the intranet and in the Internet, here is a simple trick
Server Used: IBM Blade Servers
Operating system: Windows Server 2008
Moodle Version: 2.4
WAMP Server is used.
Number of Users: 3000 (Students) + 200 (Faculty)
Open the config.php from ~/moodle/config.php
include these lines
$CFG->wwwroot = 'http://'.$server_id.'/vitcc';
$CFG->dataroot  = 'C:\\wamp\\moodledata';
before the following line
$CFG->directorypermissions = 07xx;
Restart the WAMP Server and you can Check MOODLE Site both in Internet and Intranet.

The above Image tells the intranet Link and the internet link can be opened outside the campus network

Comments

  1. Hi!
    What about if the server is in LAMP instead of WAMP?

    I put this:
    $CFG->wwwroot = 'http://'.$server_id.'/vitcc';
    $CFG->dataroot = '/var/www/moodledata';

    but the message i get from the browser is:
    The requested URL was not found on this server.

    ReplyDelete

Post a Comment

Popular posts from this blog

Installing ns3 in Ubuntu 22.04 | Complete Instructions

How to Create Ubuntu 24.04 Bootable USB Using Rufus [Step-by-Step Guide]

Installation of NS2 in Ubuntu 22.04 | NS2 Tutorial 2