wamp on LAN redirect to localhost
Posted by: awdhut (117.223.164.---)
Date: September 26, 2012 05:09PM

I've install moodle on WAMP on a Windows xp, i setup virtual host using hosts, httpd.conf, httpd-vhosts.conf.

hosts looks like
127.0.0.1 localhost
192.168.1.3 moodle

httpd.conf looks like
Listen 80
ServerName localhost:80
DocumentRoot "E:/wamp/www/"
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>


httpd-vhosts.conf.
NameVirtualHost *:80

<VirtualHost *:80>
ServerAdmin admin@localhost
DocumentRoot "E:/wamp/www/"
ServerName localhost
ServerAlias www.localhost
ErrorLog "logs/localhost-error.log"
CustomLog "logs/localhost-access.log" common
</VirtualHost>


<VirtualHost *:80>
ServerAdmin admin@moodle
DocumentRoot "E:/wamp/www/moodle/"
ServerName moodle
ServerAlias www.moodle
ErrorLog "logs/moodle-error.log"
CustomLog "logs/moodle-access.log" common
</VirtualHost>

on computer 2 , in hosts file
192.168.1.3

Now when i go to browse [moodle] ,it shows thefirst page of website but when i go to login hyperlink
it redirect to [localhost] (unable to connect).
instead of [moodle]
plz help me

Options: ReplyQuote
Re: wamp on LAN redirect to localhost
Posted by: stevenmartin99 (Moderator)
Date: September 26, 2012 05:15PM

Sounds like u installed moodle using a URL of localhost.

You should have given moodle URL

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: wamp on LAN redirect to localhost
Posted by: RiggsFolly (---.as13285.net)
Date: September 26, 2012 06:54PM

Change this

hosts looks like
127.0.0.1 localhost
192.168.1.3 moodle

to

127.0.0.1 localhost
127.0.0.1 moodle

Options: ReplyQuote
Re: wamp on LAN redirect to localhost
Posted by: awdhut (117.223.162.---)
Date: September 26, 2012 07:18PM

i replace localhost with moodle in config.php. WOW!
Thank you so much for the wonderful gift(stevenmartin99,RiggsFolly).
Thank you from the bottom of my heart for helping me.

Options: ReplyQuote
Re: wamp on LAN redirect to localhost
Posted by: RiggsFolly (---.as13285.net)
Date: September 26, 2012 11:24PM

No your HOSTS file should look like this


127.0.0.1 localhost
127.0.0.1 moodle

You need both lines.

Options: ReplyQuote
Re: wamp on LAN redirect to localhost
Posted by: awdhut (117.223.160.---)
Date: September 27, 2012 05:36PM

ya .
i done it.
thanks RiggsFolly

Options: ReplyQuote


Sorry, only registered users may post in this forum.