I know it&#39;s the harder (in the short term) solution, but in the longer it will make your life easier: fix the DNS issues. I&#39;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 &quot;10.x.y.z <a href="http://moodle.pvgc.vic.edu.au">moodle.pvgc.vic.edu.au</a>&quot; 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&#39;t all links be relative? The only reason I can think of is if the document root is not &#39;/&#39; - 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&#39;t really be necessary - am I missing something here? <br>
<br>On Sun, Nov 23, 2008 at 6:36 PM, laurie Savage <span dir="ltr">&lt;<a href="mailto:sav@pvgc.vic.edu.au">sav@pvgc.vic.edu.au</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Moodlers and PHP coders,<br>
<br>
I have a problem which I thought I&#39;d solved but, alas, only made worse.<br>
I&#39;d be grateful for your suggestions.<br>
<br>
Here goes:<br>
<br>
Our college&#39;s moodle is located on a box 10.x.y.z within our intranet<br>
which is visible to the Internet as &nbsp;<a href="http://moodle.pvgc.vic.edu.au" target="_blank">http://moodle.pvgc.vic.edu.au</a>. Its<br>
wwwroot in config.php is &quot;<a href="http://moodle.pvgc.vic.edu.au" target="_blank">http://moodle.pvgc.vic.edu.au</a>&quot; 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 &quot;10.&quot; 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>
&quot;<a href="http://moodle/" target="_blank">http://moodle/</a>&quot; which points to 10.x.y.z and modifying config.php to test<br>
whether the user&#39;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[&#39;REMOTE_ADDR&#39;];<br>
$PVGCparts = explode(&#39;.&#39;,$PVGCip);<br>
<br>
if ($PVGCparts[0] = 10)<br>
 &nbsp;{$CFG-&gt;wwwroot = &quot;<a href="http://10.x.y.z" target="_blank">http://10.x.y.z</a>&quot;;}<br>
else<br>
 &nbsp;{$CFG-&gt;wwwroot = &quot;<a href="http://moodle.pvgc.vic.edu.au" target="_blank">http://moodle.pvgc.vic.edu.au</a>&quot;;}<br>
<br>
(The logic in my script&#39;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 &amp; Tracking<br>
Pascoe Vale Girls College<br>
Pascoe Vale, Victoria, AU &nbsp;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> &nbsp;- VITTA Victorian Information Technology Teachers Association Inc</blockquote></div><br>