Creating a staging server
Not sure whether this is the right place to ask or not, but I'll give it a go. I currently have a VPS which manage my website and all my mails. I've never really sorted out backups and how to handle updates to the live server.
I've got to make n number of changes, so I thought I would manage it properly, and create a local development/staging server. This is all pretty much working - my dev server is a local Linux box, which is pretty much similar to my VPS. I re-sync from the dev server to the remote VPS to keep them in sync.
My problem is that I would like to keep the local httpd.conf (and everything else) equal to the remote one, which sounds to be pretty much difficult, since they are on different IP addresses. Any advice on how you folks handle this? As far as I know, the options are basically:
1 - edit a local hosts file, to point my website to a local IP address. This is simple and easy, but I'm worried that it may ultimately lead to confusion about whether I am looking at the development site or the production site. Maybe I should have a dedicated machine with a modified hosts file, although that look like it’s wasteful.
2 - Set up a local DNS server which associates my website with a local IP address. This is pretty much harder than (1), and I can't see that it gives any improvement.
3 - I could give the development system a different name, such as dev.mysite.com, with the production site on mysite.com. httpd.conf now has to include entries for both sites, on different IP addresses. I'm not dotty about this, since the sites are no longer identical, but it looks easy.
Any ideas/suggestions?
|