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 <span dir="ltr"><<a href="mailto:sav@pvgc.vic.edu.au">sav@pvgc.vic.edu.au</a>></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'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</blockquote></div><br>