Windows server: Where to find the reference for "http://localhost"?!?

Windows server: Where to find the reference for "http://localhost"?!?

by Jay Mac -
Number of replies: 3

I said up Moodle on Windows Server 2003.  I can get to the moodle site on my server by going to http://localhost:8081 or what ever I changed it to in config.php and I changed the port I am using.

I can also access my moodle site by going to http://mysite.site:8081 (externally) and it opens fine, however, when I click on log in, it goes to http://localhost:8081 (I am external - so that will not work).

Does any one have any ideas?

Average of ratings: -
In reply to Jay Mac

Re: Windows server: Where to find the reference for "http://localhost"?!?

by Denise Martin -

Hi,

I have the very same problem, just setup moodle 1.9 on windows 2003 server. can logon to moodle locally, can access external url, but when i click on Logon it goes to localhost/logon/index.php & not the external URL. Config.php shows correct external address.

Hopefull someone out there has the answers

In reply to Denise Martin

Re: Windows server: Where to find the reference for "http://localhost"?!?

by Colin Fraser -
Picture of Documentation writers Picture of Testers
Well, simple, two things, firstly, open the config.php file in the Moodle root folder. in the line

$CFG->wwwroot = 'http://localhost';

Change it to read:

$CFG->wwwroot = 'http://you.ip.address.here/moodle';

if you have Moodle in a folder of its own. If you are not sure, open your IIS.ini file and look to see what the document root folder is, (something like wwwdocumentroot or some such from memory). If you are using Apache, open the httpd.conf file and look for "documentroot" that will tell you.

Second, you might want to look at Moodle Docs, the Beginning Administration pages, there is a lot of help there for common issues for new Admins. The more information you have, the more quickly it becomes available to you, allows you a considerably less level of frustration when you first get started. There are alos links off to other docs that provide a lot more help.

Good luck...


In reply to Colin Fraser

Re: Windows server: Where to find the reference for "http://localhost"?!?

by Jeffrey Bausch -

ServerRoot "D:/moodle/Moodle/shs/server/apache"

#
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the <VirtualHost>
# directive.
#
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
#
#Listen 12.34.56.78:80
Listen 80

I followed this path and can not find Listen, I'm sure this is where I need to make the IP change.

Any suggestions