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)?



The easiest way to achieve this is simply edit your /etc/hosts file and add a name to for your mock laptop site, such as:  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
  • 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 '14 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 '14 at 20:52
  • What about using git to push a config to Digital Ocean? – Quasaur Aug 4 '14 at 21:16
  • I would definitely use a PaaS provider such as OpenShift for that, not a VPS ;-) – Gheesh Aug 5 '14 at 23:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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