<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40"
xmlns:ns0="urn:schemas-microsoft-com:office:smarttags">
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><o:SmartTagType
namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="PlaceType"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="PlaceName"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="country-region"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="State"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="City"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="place"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="Street"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="address"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="PersonName"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"Script MT Bold";
        panose-1:3 4 6 2 4 6 7 8 9 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:blue;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:595.3pt 841.9pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.Section1
        {page:Section1;}
-->
</style>
</head>
<body lang=EN-AU link=blue vlink=blue>
<div class=Section1>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>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.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<div>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><font
size=5 face="Script MT Bold"><span style='font-size:18.0pt;font-family:"Script MT Bold"'><ns0:PersonName
w:insAuthor="sbloomer" w:insDate="2008-11-24T10:25:00Z" w:endInsAuthor="sbloomer"
w:endInsDate="2008-11-24T10:25:00Z"><st1:PersonName w:st="on"><font
color=navy><span style='color:navy'>Stephen Bloomer</span></font></st1:PersonName><br>
</ns0:PersonName></span></font><font size=2 color=navy face=Arial><span
style='font-size:10.0pt;font-family:Arial;color:navy'><a
href="mailto:sbloomer@stpeters.vic.edu.au">sbloomer@stpeters.vic.edu.au</a> <br>
Network Manager<br>
St. Peter's College<br>
</span></font><font size=2 face=Arial><span style='font-size:10.0pt;font-family:
Arial'><ns0:Street w:insAuthor="sbloomer" w:insDate="2008-11-24T10:25:00Z"
w:endInsAuthor="sbloomer" w:endInsDate="2008-11-24T10:25:00Z"><ns0:address
w:insAuthor="sbloomer" w:insDate="2008-11-24T10:25:00Z"
w:endInsAuthor="sbloomer" w:endInsDate="2008-11-24T10:25:00Z"><st1:Street
w:st="on"><st1:address w:st="on"><font color=navy><span style='color:navy'>Cranbourne-Frankston
Road</span></font></st1:address></st1:Street></ns0:address></ns0:Street><font
color=navy><span style='color:navy'><br>
</span></font><ns0:place w:insAuthor="sbloomer" w:insDate="2008-11-24T10:25:00Z"
w:endInsAuthor="sbloomer" w:endInsDate="2008-11-24T10:25:00Z"><ns0:City
w:insAuthor="sbloomer" w:insDate="2008-11-24T10:25:00Z"
w:endInsAuthor="sbloomer" w:endInsDate="2008-11-24T10:25:00Z"><st1:place
w:st="on"><st1:City w:st="on"><font color=navy><span style='color:navy'>Cranbourne</span></font></st1:City></ns0:City></st1:place><font
color=navy><span style='color:navy'>, </span></font><ns0:State
w:insAuthor="sbloomer" w:insDate="2008-11-24T10:25:00Z"
w:endInsAuthor="sbloomer" w:endInsDate="2008-11-24T10:25:00Z"><st1:State
w:st="on"><font color=navy><span style='color:navy'>Victoria</span></font></st1:State></ns0:State><font
color=navy><span style='color:navy'>, </span></font><ns0:country-region
w:insAuthor="sbloomer" w:insDate="2008-11-24T10:25:00Z"
w:endInsAuthor="sbloomer" w:endInsDate="2008-11-24T10:25:00Z"><st1:country-region
w:st="on"><font color=navy><span style='color:navy'>Australia</span></font></st1:country-region></ns0:country-region></ns0:place><font
color=navy><span style='color:navy'>, 3977</span></font></span></font><font
color=navy><span style='color:navy'><o:p></o:p></span></font></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><font
size=3 color=navy face="Times New Roman"><span style='font-size:12.0pt;
color:navy'>Phone +61 3 5996 6733<br>
Fax +61 3 5996 8277<o:p></o:p></span></font></p>
</div>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<div>
<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span lang=EN-US style='font-size:12.0pt'>
<hr size=2 width="100%" align=center tabindex=-1>
</span></font></div>
<p class=MsoNormal><b><font size=2 face=Tahoma><span lang=EN-US
style='font-size:10.0pt;font-family:Tahoma;font-weight:bold'>From:</span></font></b><font
size=2 face=Tahoma><span lang=EN-US style='font-size:10.0pt;font-family:Tahoma'>
moodle-bounces@edulists.com.au [mailto:moodle-bounces@edulists.com.au] <b><span
style='font-weight:bold'>On Behalf Of </span></b>victor rajewski<br>
<b><span style='font-weight:bold'>Sent:</span></b> Monday, 24 November 2008
10:21 AM<br>
<b><span style='font-weight:bold'>To:</span></b> The Moodle Users' in Schools
Mailing List<br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: [Moodle] Dynamically
changing wwwroot</span></font><span lang=EN-US><o:p></o:p></span></p>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>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 <a
href="http://moodle.pvgc.vic.edu.au">moodle.pvgc.vic.edu.au</a> which sends
them to the external IP? On a test machine on the intranet, try adding
"10.x.y.z <a href="http://moodle.pvgc.vic.edu.au">moodle.pvgc.vic.edu.au</a>"
to the hosts file, and see if that gets around your 403 errors. <br>
<br>
Also, is there an expection for the moodle server in the proxy settings for the
clients?<br>
<br>
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 <a
href="http://server.tld/moodle">http://server.tld/moodle</a> - 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? <br>
<br>
On Sun, Nov 23, 2008 at 6:36 PM, laurie Savage <<a
href="mailto:sav@pvgc.vic.edu.au">sav@pvgc.vic.edu.au</a>> wrote:<o:p></o:p></span></font></p>
<div>
<blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;
margin-left:4.8pt;margin-right:0cm'>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>Hi Moodlers and PHP coders,<br>
<br>
I have a problem which I thought I'd solved but, alas, only made worse.<br>
I'd be grateful for your suggestions.<br>
<br>
Here goes:<br>
<br>
Our college's moodle is located on a box 10.x.y.z within our intranet<br>
which is visible to the Internet as <a
href="http://moodle.pvgc.vic.edu.au" target="_blank">http://moodle.pvgc.vic.edu.au</a>.
Its<br>
wwwroot in config.php is "<a href="http://moodle.pvgc.vic.edu.au"
target="_blank">http://moodle.pvgc.vic.edu.au</a>" and users use<br>
this address whether they are at school (intranet access) or at home. All<br>
machines on our local network are prefixed with "10." and our border
IP<br>
identifies as 210.a.b.c.<br>
<br>
When users access the site using the intranet and the<br>
<a href="http://moodle.pvgc.vic.edu.au" target="_blank">moodle.pvgc.vic.edu.au</a>
URL they get a lot of 403 errors and my logs report<br>
a lot of header problems. A bit of research suggested DNS issues.<br>
<br>
I thought I would fix this by having my intRAnet users use an alias<br>
"<a href="http://moodle/" target="_blank">http://moodle/</a>" which
points to 10.x.y.z and modifying config.php to test<br>
whether the user's IP starts with 10. The result was access through the<br>
intRAnet was greatly improved but the site was unusable over the intERnet<br>
- the document root is identified as 10.x.y.z instead of<br>
<a href="http://moodle.pvgc.vic.edu.au" target="_blank">moodle.pvgc.vic.edu.au</a>.
Here is the modification:<br>
<br>
$PVGCip = $_SERVER['REMOTE_ADDR'];<br>
$PVGCparts = explode('.',$PVGCip);<br>
<br>
if ($PVGCparts[0] = 10)<br>
{$CFG->wwwroot = "<a href="http://10.x.y.z" target="_blank">http://10.x.y.z</a>";}<br>
else<br>
{$CFG->wwwroot = "<a href="http://moodle.pvgc.vic.edu.au"
target="_blank">http://moodle.pvgc.vic.edu.au</a>";}<br>
<br>
(The logic in my script's first two lines works - try it in a little<br>
script to display and reformat the contents of $parts[n])<br>
<br>
Laurie<br>
--<br>
Laurie Savage<br>
=<br>
Student Assessment/Reporting & Tracking<br>
Pascoe Vale Girls College<br>
Pascoe Vale, Victoria, AU 9306 2544<br>
_______________________________________________<br>
<a href="http://www.edulists.com.au" target="_blank">http://www.edulists.com.au</a>
- FAQ, resources, subscribe, unsubscribe<br>
Moodle Mailing List kindly supported by<br>
<a href="http://www.vcaa.vic.edu.au" target="_blank">http://www.vcaa.vic.edu.au</a>
- Victorian Curriculum and Assessment Authority and<br>
<a href="http://www.vitta.org.au" target="_blank">http://www.vitta.org.au</a>
- VITTA Victorian Information Technology Teachers Association Inc<o:p></o:p></span></font></p>
</blockquote>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><br>
_______________________________________________ <br>
<a href="http://www.edulists.com.au">http://www.edulists.com.au </a>- FAQ,
resources, subscribe, unsubscribe <br>
Moodle Mailing List kindly supported by <br>
<a href="http://www.vcaa.vic.edu.au">http://www.vcaa.vic.edu.au </a>- Victorian
Curriculum and Assessment Authority and <br>
<a href="http://www.vitta.org.au">http://www.vitta.org.au </a>- VITTA Victorian
Information Technology Teachers Association Inc<o:p></o:p></span></font></p>
</div>
</body>
</html>