by Ramji Shinde.
Thanks for your reply sir,
yes i have DNS entry of domain name pointing to my ip
no i am not using external host
i have explain what is in my moodle config file and how i change it to domain name in following paragraph
first of all i have static ip which is pointing to my domain name. with same public ip i have network connection. On that machine i have install moodle on fedora 19 initially in config.php file it is
$CFG->wwwroot = 'http://localhost/moodle';
but now i want it to change from localhost to my domain name for accessing from anywhere in internet so i change config.php file to
$CFG->wwwroot = 'http://mydomainname.com/moodle'
but it shows me 403 forbidden (you dont have permission to access /moodle on this server) error so please help me to solve this problem.