Incorrect access detected... Error

Incorrect access detected... Error

by Robert Wilson -
Number of replies: 3

We are running moodle 2.1.1 on Ubuntu 10.04.2.  Some file resources are getting the following error. 

"Incorrect access detected, this server may be accessed only through "http://moodle.mccallie.org" address, sorry."

If one right mouse clicks on the link and opens the resource in a new tab, a page displays the link and clicking the link opens the file.

If one Updates the file resource and saves the resource, the file opens as expected.

Earlier this week, we renamed our server from newmoodle.mccallie.org to moodle.mccallie.org. I think this caused this issue.

The hostname has been changed and $CFG->wwwroot is set to http://moodle.mccallie.org. Is there something else that I can look at that might resolve this issue?

Thanks,

Robert

Average of ratings: -
In reply to Robert Wilson

Re: Incorrect access detected... Error

by Brian LaMaster -

Hello Robert,

I don't know if you have resolved your issue or not, but I had the same issue. When I installed moodle it used the IP address in the config.php file. I simply corrected it by changing it to my www.mydomain.com address.

However, doing this did cause me another issue which can be found below

http://moodle.org/mod/forum/discuss.php?d=186865#p820303

Hope this helps.

Brian

In reply to Robert Wilson

Re: Incorrect access detected... Error

by Ken Task -
Picture of Particularly helpful Moodlers

Try http://moodle.mccallie.org/admin/replace.php

Search for http://newmoodle.mccallie.org/ (your old hostname for server) and replace with http://moodle.mccallie.org/ (new hostname for server).

* BACKUP * before using. ;)

'spirit of sharing', Ken

In reply to Ken Task

Re: Incorrect access detected... Error

by Andrew Golightly -

I have the same error... I see why, but don't know how to fix it.

In the config file we have $CFG->wwwroot = 'http://oursite.co';

Accessing the site at this URL works fine.

However if someone accesses www.oursite.co we get that error. So I guess we need a redirect somewhere for the www.oursite.co address to go to oursite.co to get around it. Best way?