proper domain for $config['root_url'] in config.php

Help with getting the CMS CORE package up and running. This does not include 3rd party modules, PHP scripts, anything downloaded via module manager or from any external source.
Locked
living1108
New Member
New Member
Posts: 2
Joined: Thu Jun 04, 2009 10:25 am

proper domain for $config['root_url'] in config.php

Post by living1108 »

Hi all,

We are planing to redo our web site using the latest version of CMS Made Simple on a new server (VM). The old site will be retired once the new site is ready. My question is, what are the appropriate values for $config['root_url'] and $config['ssl_url'] on the new server in this situation? Can we set $config['root_url'] to same the url as the live site? (eg 'http://www.mydomain.com') or should we set it to 'http://site2.mydomain.com' and make the appropriate DNS updates. Once the development is done, we would then change $config['root_url'] to 'http://www.mydomain.com' and do another DNS update to point to the new server IP.

To be clear, we have ftp access to the new site (server) using it's IP address so the hostname won't be an issue there.

Thanks for your input.

#-------------
#Path Settings
#-------------

#Document root as seen from the webserver. No slash at the end
#If page is requested with https use https as root url
#e.g. "http://blah.com"
$config['root_url'] = 'http://www.mydomain.com';

#SSL URL. This is used for pages that are marked as secure.
$config['ssl_url'] = 'https://www.mydomain.com';

#Path to document root. This should be the directory this file is in.
#e.g. /var/www/localhost
$config['root_path'] = '/var/www/cmsms';
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: proper domain for $config['root_url'] in config.php

Post by Dr.CSS »

When you install it it takes the domain name of "whateversite.com"/install/install.php...
User avatar
manuel
Power Poster
Power Poster
Posts: 354
Joined: Fri Nov 30, 2007 9:15 am

Re: proper domain for $config['root_url'] in config.php

Post by manuel »

If your domain is pointing to the old server and you are setting up the cms on a different server you can install/configure cmsms with the new server's IP followed by ~accountusername (on cPanel at least, if you are using something else as a control panel you should check to see how you can "preview" domains)

Please be aware that there might be some issues that won't occur when the domain name is pointing to the new account. (ex: don't force www. in .htaccess or you'll end up with "http://www.000.000"...)

ex: "http://000.000.000.000/~manuel"

When you are done setting up the website on the new server you just replace all occurrences of "http://000"... with the real domain name, update the nameservers of the domain and monitor the domain to see if everything goes well.

Monitoring:
Because your ISP probably caches DNS you won't see the nameserver changes take effect immediately.
I usually check trough a proxy like hidemyass.com to avoid this.

On your local pc: in the command prompt: "ipconfig -flushdns" to clear the dns cache, then "nslookup yourdomain.com" to see if the IP has already changed.

one more thing: you can leave the old server "live" for one or 2 days to check if any more mails have arrived in the mailboxes. You can easily check this by logging in to the webmail of the individual accounts.
On cPanel the URL to use would be:
"https://DOMAINOFYOURWEBHOSTSERVER.com:2 ... _task=mail"
(because "http://webmail.yourdomain.com" will already be pointing to the new server)

Greetings,
Manuel
Last edited by Dr.CSS on Wed Jan 04, 2012 7:30 pm, edited 1 time in total.
Reason: Please use double quotes on fake links so they aren't clickable...
Locked

Return to “[locked] Installation, Setup and Upgrade”