Access from Multiple URLs

Access from Multiple URLs

by Graham Salmon -
Number of replies: 2

I have successfully installed Moodle on my Fedora 7 server and wish to access the site from the local intranet and from the Internet.

If I I set up config.php to use the local address of the computer 'linux2' in the url as follows I can access the site locally with no problems

$CFG->wwwroot = 'http://linux2/moodle'

When I access the site from the Internet the host 'linux2' is of course not available so the site is not accessible.

I have successfully done this in the past by typing the following

$CFG->wwwroot = '/moodle'

This gives me the log on page but when I type in the username and password then press "Login" I get an error. The url that it is trying to access looks like this:

http://ipaddress/moodle/moodle/

If I remove the second "moodle" from the address it continues and logs me into the site.

Is there something else I can do so that both local and internet can use the site without difficulty?

The instructions when installing moodle do imply that this should be possible but recommend using a url that is "most natural" for the students.

I have tried using 2 installations of moodle and using the second for access from the internet. However, anything I upload from the internet such as pictures ends up with the source url still looking for the picture using the external address so these are therefore not accessibe from the local intranet.

 Am I missing something or is this not possible.

Many thanks

Average of ratings: -
In reply to Graham Salmon

Re: Access from Multiple URLs

by Richard Enison -
In reply to Richard Enison

Re: Access from Multiple URLs

by Graham Salmon -

Thank you Richard,

By the time you wrote this I had already done a search on "wwwroot" and found an entry about creating a new DNS Zone. It is now working beautifully. I can edit my courses from home and the pupils can access them using the same domain name at school.

Many thanks for your reply.

GS