[Moodle] Dynamically changing wwwroot

Stephen Bloomer sbloomer at stpeters.vic.edu.au
Mon Nov 24 10:27:04 EST 2008


Yes, this is defiantly a DNS issue and not something I would fix within
your Moodle site.  You need the address of moodle.pvgc.vic.edu.au
manually added to your local DNS server.

 

Stephen Bloomer
sbloomer at stpeters.vic.edu.au 
Network Manager
St. Peter's College
Cranbourne-Frankston Road
Cranbourne, Victoria, Australia, 3977

Phone  +61 3 5996 6733
Fax      +61 3 5996 8277

 

________________________________

From: moodle-bounces at edulists.com.au
[mailto:moodle-bounces at edulists.com.au] On Behalf Of victor rajewski
Sent: Monday, 24 November 2008 10:21 AM
To: The Moodle Users' in Schools Mailing List
Subject: Re: [Moodle] Dynamically changing wwwroot

 

I know it's the harder (in the short term) solution, but in the longer
it will make your life easier: fix the DNS issues. I'm guessing the
hosts on the intRAnet are performing a DNS lookup on
moodle.pvgc.vic.edu.au which sends them to the external IP? On a test
machine on the intranet, try adding "10.x.y.z moodle.pvgc.vic.edu.au" to
the hosts file, and see if that gets around your 403 errors. 

Also, is there an expection for the moodle server in the proxy settings
for the clients?

On broader note, why does moodle really need to know what the document
root is? Why can't all links be relative? The only reason I can think of
is if the document root is not '/' - i.e. if moodle is access by
http://server.tld/moodle - in which case all links have to be relative
to /moodle, but the server part of the URL shouldn't really be necessary
- am I missing something here? 

On Sun, Nov 23, 2008 at 6:36 PM, laurie Savage <sav at pvgc.vic.edu.au>
wrote:

	Hi Moodlers and PHP coders,
	
	I have a problem which I thought I'd solved but, alas, only made
worse.
	I'd be grateful for your suggestions.
	
	Here goes:
	
	Our college's moodle is located on a box 10.x.y.z within our
intranet
	which is visible to the Internet as
http://moodle.pvgc.vic.edu.au. Its
	wwwroot in config.php is "http://moodle.pvgc.vic.edu.au" and
users use
	this address whether they are at school (intranet access) or at
home. All
	machines on our local network are prefixed with "10." and our
border IP
	identifies as 210.a.b.c.
	
	When users access the site using the intranet and the
	moodle.pvgc.vic.edu.au URL they get a lot of 403 errors and my
logs report
	a lot of header problems. A bit of research suggested DNS
issues.
	
	I thought I would fix this by having my intRAnet users use an
alias
	"http://moodle/" which points to 10.x.y.z and modifying
config.php to test
	whether the user's IP starts with 10. The result was access
through the
	intRAnet was greatly improved but the site was unusable over the
intERnet
	- the document root is identified as 10.x.y.z instead of
	moodle.pvgc.vic.edu.au. Here is the modification:
	
	$PVGCip = $_SERVER['REMOTE_ADDR'];
	$PVGCparts = explode('.',$PVGCip);
	
	if ($PVGCparts[0] = 10)
	 {$CFG->wwwroot = "http://10.x.y.z";}
	else
	 {$CFG->wwwroot = "http://moodle.pvgc.vic.edu.au";}
	
	(The logic in my script's first two lines works - try it in a
little
	script to display and reformat the contents of $parts[n])
	
	Laurie
	--
	Laurie Savage
	=
	Student Assessment/Reporting & Tracking
	Pascoe Vale Girls College
	Pascoe Vale, Victoria, AU  9306 2544
	_______________________________________________
	http://www.edulists.com.au - FAQ, resources, subscribe,
unsubscribe
	Moodle Mailing List kindly supported by
	http://www.vcaa.vic.edu.au - Victorian Curriculum and Assessment
Authority and
	http://www.vitta.org.au  - VITTA Victorian Information
Technology Teachers Association Inc


_______________________________________________ 
http://www.edulists.com.au - FAQ, resources, subscribe, unsubscribe 
Moodle Mailing List kindly supported by 
http://www.vcaa.vic.edu.au - Victorian Curriculum and Assessment
Authority and 
http://www.vitta.org.au - VITTA Victorian Information Technology
Teachers Association Inc

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.edulists.com.au/pipermail/moodle/attachments/20081124/8921918e/attachment-0001.html


More information about the moodle mailing list