Setting up hosts & VirtualHosts without domain names

Hi folks,

I'm pretty new to the VPS and ground-up Linux configuration games, and I have a few questions that are hopefully silly ones with easy answers.

My situation is as follows. I currently have sites across multiple domains and subdomains, all on shared hosting in various places.

I am going to want ultimately to move all of those sites to my Linode. The general workflow I want for this is as follows: Set everything up on the server so that each site is up and running, and then only when that site is working correctly do I want to actually move the domain name from pointing to the current shared hosting solution to my shiny new Linode.

This order of things is causing me some confusion as I try to set the server up with a LAMP stack.

The first point of confusion for me is in editing /ect/hosts. If I do not yet have any domain names pointing to my Linode, what makes sense to use as my FQDN? Do I want to leave that blank until I transfer at least one domain over, or do I use a domain that is currently still resolving to my shared host but will move over soon, or do I in fact need to have a domain pointing to my Linode before setting the FQDN?

Similarly, I am not sure what to do with VirtualHosts right now as I set up Apache. is there something that makes sense to put there?

I suppose the thing that I ultimately want is to be able to access sites and applications via something like "http://IPaddress/foo" while I am making sure that everything works on the Linode, then once the site is working, setup the DNS to point away from my shared host and to the new site.

How should I go about doing this?

Thanks!

1 Reply

The approach I've used is to configure the new server as it would be for production. Use your local workstation OS host file to point to the new web server's IP for the virtual host, instead of using DNS to look up the IP address as would normally happen. That way you can test things. Then when you are ready to make the switchover, you make the necessary DNS changes for the hosted websites (virtualhost).

I would suggest you reduce the TTL of your A records for the hosted sites you plan to migrate, well in advance before the switch over to reduce DNS caching issues. And as others have noted in the forums, having something on the old host to redirect traffic to the new web server, for cached DNS can help ensure your users get to new location.

Travis

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct