Two great hosts for Ruby on Rails are Slicehost and Linode. With these hosts you fully manager your virtual private server, installing the operating system, modifying apache (on Ning…), etc.. I use Ubuntu as the operating system and Apache as the web server.
If you are moving a domain from elsewhere it can be wise to reduce the TTL time to say 5 minutes a few days before you make the switch. This is make the change propagate across the internet more quickly.
- And DNS entry on your profile (login to your, for example, Linode account)
- Add a new file for /etc/apache2/sites-available/your_site_name.com
- create the directories needed on your server
- enable the site (for apache)
sudo a2ensite example.com
- Test the site out to make sure the setup is working properly. Create a index.html page and just verify the page is displayed. Change your local hosts file to point to your server IP address for the new domain you created. If not, take steps to get this to work, before continuing with the rest of the checklist.
- copy over the site – if you are moving the site from elsewhere
- remember to move the database over, if the site relies on a database
- restart apache
sudo /etc/init.d/apache2 restart
sudo nano /etc/apache2/sites-available/example.com
The file would look something like this: with your ip in place of 22.214.171.124
ServerAdmin is the address Apache will use to send error messages to. Using gmail and the + option lets you use one gmail account and just use rules to filter all your sites.
You should see the file you created /etc/apache2/sites-available/example.com now also at /etc/apache2/sites-enabled/example.com
You can test the site out, before updating the DNS, by changing your local hosts file to point to your server IP address for the new domain you created.