Installing internally and externally?

Installing internally and externally?

by Darren Smith -
Number of replies: 4

I have set moodle up on our webserver so the kids can access it from home. Great. No problems.

What I would like to happen is when the kids are in school for them to access moodle locally. This is a problem as I force login on the webserver so when they put server/moodle it redirects them to server.domain.org.uk/moodle (hence going through our internet connection).

I do not seem to be able to think of a way around this other than have another installation of moodle set to local on, say, a different server but point this installation at the same moodledata folder and the same mysql db.

I have tried it and tried to reflect this in config.php on server2/moodle but this new moodle won't load - all i get is a white screen on first run (as for /server2/moodle/admin/)

Anyone done this?

Is it possible?

Am I wasting my time?

TIA

Darren

Average of ratings: -
In reply to Darren Smith

Re: Installing internally and externally?

by Andy Diament -

We now have 1 server on the network with 2 i/p addresses, 1 visible only inside the firewall, 1 only outside; 2 moodle directories (different names), both pointing to the same moodledata and mysql->moodle database: I'll see if I can find out how the i/p addresses were set up, and if there is any difference in the config,php for each moodle dir

Andy D

In reply to Darren Smith

Re: Installing internally and externally?

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
This depends entirely on how your network is set up - we need to know more about this as a minimum.

Is it deliberate that your external address cannot be seen from inside the school? The only time I have seen this is with certain cheap and nasty routers that do not wrap back the external IP address properly if they are acting as masquerading routers (ie, you internal machines do not have 'real' IP addresses). This is really a fault of the router or its routing tables configuration.
In reply to Darren Smith

Re: Installing internally and externally?

by Reeny George -

Try the following 

$CFG->wwwroot   = "http://".$_SERVER["HTTP_HOST"]."/moodle";

or  (if moodle is installed at  / )

$CFG->wwwroot   = "http://".$_SERVER["HTTP_HOST"]."/";   

 It works for me on Apache 2.0 servers.

In reply to Reeny George

Re: Installing internally and externally?

by Darren Smith -

Woohoo big grin

Didn't quite understand this at first but realised that you just meant add this line to the main installation and don't bother with a second server / folder.

Thanks to all those who replied

Darren