Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

For the past few years I've been a Bluehost / LAMP site developer, but now i intend to switch to Digital Ocean to get a competitively-priced VPS i can use to pursue other technologies (nginx, Scheme & Clojure development).

I've a couple of laptops i'm using to test my current LAMP / Joomla! / JQuery -based domain & subdomains on to make sure I can get them to work on Digital Ocean.

QUESTION: how would i setup DNS / IP resolution on the test / development environment?

Would I create a "closed" environment using my real domain name and local DNS to "mimic" the Digital Ocean VPS?

Would i create a "ficitious" domain on the test laptop(s), get my current site up and running then "translate" the working config to the real domain?

What caveats do i need to pay attention to (DNS, nginx, CGI)?

Thanks!

share|improve this question

1 Answer 1

up vote 0 down vote accepted

The easiest way to achieve this is simply edit your /etc/hosts file and add a name to 127.0.0.1 for your mock laptop site, such as:

127.0.0.1  localhost laptopname www.mydomain.com

Then you can set up nginx in your laptop and serve content from there using the loopback interface, which cannot be accessed remotely.

Once you are satisfied with the nginx configuration and the content, you can:

  • Create a VPS on DigitalOcean
  • Install nginx
  • Replicate your laptop's configuration and content
  • Add a real DNS record that points to the VPS so everybody can access it
share|improve this answer
    
Thank you for taking the time to reply...is tools like Dokku or Vagrant too "bulky" or complicated for a single site with five subdomains? –  Quasaur Aug 4 at 16:36
    
It's not (just) a matter of site complexity but the traffic you need to serve. These tools might be a little overkill but you never know and if you don't have a pressure to release soon, it's always worth learning! :-) –  Gheesh Aug 4 at 20:52
    
What about using git to push a config to Digital Ocean? –  Quasaur Aug 4 at 21:16
    
I would definitely use a PaaS provider such as OpenShift for that, not a VPS ;-) –  Gheesh Aug 5 at 23:39

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.