127.0.0.1 address error. HELP!

127.0.0.1 address error. HELP!

by Ibrahim A -
Number of replies: 5

I just installed a clean version of Moodle 2.1.1 on Server 2008 with MySQL, IIS 7 and PHP exactly how this tutorial says: 

http://www.bfcnetworks.com/whitepapers/installing-moodle-2-on-windows-server-mysql-php-and-iis7/

 

The werid issues I am having now is when I attempt to access the server IP address from the outside world, it gives me this:

"

Incorrect access detected, this server may be accessed only through "http://127.0.0.1" address, sorry.
Please notify server administrator.
"
and then gives me an error because there is no Moodle installed from the outside world computers. 
Is there any fix so that a login screen will show up instead?
Thanks!
Average of ratings: -
In reply to Ibrahim A

Re: 127.0.0.1 address error. HELP!

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

What value have you set in config.php for

$CFG->wwwroot

In reply to Marcus Green

Re: 127.0.0.1 address error. HELP!

by Ibrahim A -

I Just changed it to:

$CFG→wwwroot = ‘http://127.0.0.1:80/moodle’;

It goes to the main page now but then wont allow me to login because it is then redirecting to http://127.0.0.1/moodle/login/index.php.

 

In reply to Ibrahim A

Re: 127.0.0.1 address error. HELP!

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

127.0.0.1 is only the ip address of the machine you are sitting at, it is the same on every machine, and is the same on every machine. You need to find out the actual ip address of the server machine. You should be able to find this out by running a command prompt and typing ipconfig on that machine.  The value IPv4 Address is what you want.  Within your organisation it will probably start with 192.xxx.xxx.xxx. But not on the wider internet.

In reply to Marcus Green

Re: 127.0.0.1 address error. HELP!

by Ibrahim A -

I tried changing it to my IP address, http://173.167.148.52 and then when I hit login it gives me a 404 error file or directory not found?

Thank you very much for your help!

 

In reply to Ibrahim A

Re: 127.0.0.1 address error. HELP!

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

The fact that you are getting a 404 error suggests that you are reaching the instance of apache on the server.  Can you see the moodle instance from the server machine itself? i.e. localhost/moodle (or whatever the directory it is in). I just re-read your message and realised you are seeing the login screen, have you got the  dirroot value set correctly, e.g. under windows it might be

$CFG->dirroot   = 'C:\xampp\htdocs\moodle';