Checklist: Setting Up a New Domain on VPS

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.

  1. And DNS entry on your profile (login to your, for example, Linode account)
  2. Add a new file for /etc/apache2/sites-available/your_site_name.com
  3. sudo nano /etc/apache2/sites-available/example.com

    The file would look something like this: with your ip in place of 8.8.8.8

    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.

  4. create the directories needed on your server
  5. enable the site (for apache)
    sudo a2ensite example.com
  6. You should see the file you created /etc/apache2/sites-available/example.com now also at /etc/apache2/sites-enabled/example.com

  7. 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.
  8. copy over the site – if you are moving the site from elsewhere
  9. remember to move the database over, if the site relies on a database
  10. restart apache
    sudo /etc/init.d/apache2 restart
  11. 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.

    Resources: Install the Apache 2 Web Server on Ubuntu 10.04 LTS (Lucid)

5 thoughts on “Checklist: Setting Up a New Domain on VPS

  1. Pingback: Wordpress: Multiple Blog Network on One Server – Overcoming Conflicts | Coding and Server Syntax Examples

  2. Pingback: Set the Web Server to Use the Domain Without www | Coding and Server Syntax Examples

  3. Pingback: Upgrading VPS Web Server from Ubuntu 10.04 to 12.04 | Coding and Server Syntax Examples

  4. Pingback: Updates Needed When Upgrading from Apache 2.2 to 2.4 | Coding and Server Syntax Examples

  5. Pingback: How to Manually Run Cron Tasks | Coding and Server Syntax Examples

Leave a Reply

Your email address will not be published. Required fields are marked *

This Blog will give regular Commentators DoFollow Status. Implemented from IT Blögg