Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial

Lauren Clark
33,155 PointsProject for working with a Virtual Host and DNS
I've recently been shown by a senior developer (really roughly) how to work off a virtual server, and use a domain name like 'http://dev.ourcompany.com.uk' , through our local IP address.
It's been really handy, I can work on a local server and then pass the URL to the customer for a preview, rather than having to shift the entire thing to a test site. This is acceptable for static sites but when working with PHP it's unacceptable to port over a database and a set of files every time there is a new set of changes to be made.
Any chance of a Treehouse Teacher going over in depth on how to do this on Win, Mac & Linux?
We've been using Xampp, trying to do it with MAMP was causing issues.
If anyone has a blog post on how to do this or cares to explain? I love it but doubt I could replicate what the guy did on my own.
Edit: Basically how to have a local host on a quasi-fake domain, set up through DNS whereby you can have a folder per port number, and then pass that address to the customer for them to see as long as your machine is running.
6 Answers

Dustin Matlock
33,856 PointsA couple tutorials geared more towards what you are wanting to do.

Jason Seifer
Treehouse Guest TeacherHey Lauren Clark I'm not sure if this is what you're looking for but localtunnel might be a project that does what you want. It is a node app that allows you to share what you're working on over the internet pretty easily. You just need to know the port of what your local development environment is using.

Lauren Clark
33,155 PointsThis looks like it will do the trick :) Thanks.

Dustin Matlock
33,856 PointsI'm sort of on the run but I came across this link with more than one solution. DigitalOcean is another low-cost way to setup a test environment.

Lauren Clark
33,155 PointsAhh some nice links there but I don't want to purchase anything, I'd rather set it up myself. The tutorial that appears like it would answer some of my questions, unfortunately, 404's!

Lauren Clark
33,155 PointsHampton Paulk or Jason Seifer or anyone with god-mode enabled, can you shine some light? :)

Dustin Matlock
33,856 PointsSome more possible solutions. I think locally without some sort of sandboxing you always will run into issues.