Setup Dolibarr online service

In conf.php file, I changed “$dolibarr_main_url_root=‘http://localhost/dolibarr’;” into my domain name, but it did not work. So what should I change to make my Dolibarr online.
Thanks!

You should do: localhost/dolibarr/htdocs