Hi Anil
You have grabbed an old discussion.
Any way, the idea behind the line
$CFG->wwwroot = http://".$_SERVER["HTTP_HOST"].";
is that .$_SERVER["HTTP_HOST"] will be replaced by the HTTP_HOST variable _at each HTTP request_.
If you call http://a.b.c.d, then wwwroot will be http://a.b.c.d; if you call http://some.dns.name then wwwroot is http://some.dns.name, etc.
I'm not sure whether I'm answering the right quesion ;-(
Hardware and performance
installing moodle on an external server
This discussion has been locked so you can no longer reply to it.