Pages

Tuesday, February 15, 2011

Running a Development Server on Dropbox


I have found a very useful way of running a development server across computers using Dropbox. Since Dropbox sits as a file folder on your computer, you can put anything you want into it. I have done this by using Xampp to run a development server I can access from any computer that I may access to. Let me explain how I've done this. These instructions are for Windows, but may be modified for Mac or Linux, depending on what Dropbox supports.
1. Visit DropBox to sign up and download their desktop application.  Yes, that is a referral link and I'll gain a small amount of extra space for you signing up through that link. Once you're signed up, you can do the same.
2. Visit Xampp and download one of the Xampp for Windows files (or whatever OS you're using that Dropbox might work with).
3. Run the installer and change the installation directory to that of Dropbox (typically C:\Users\{username}\My Documents\My Dropbox).
4. It'll create a directory called xampp in that folder.
5. Navigate to the apache/conf folder and open the httpd.conf file in a text editor. Look for all instances of localhost and add :8080 to the end so that it reads localhost:8080. This will ensure that you can run this alongside the default Windows localhost which runs IIS, if it is turned on.
6. After this, navigate back up to the main xampp folder and find the xampp-control.exe file. Double-click it and run the apache and mysql instances. If one stops, something went wrong. You can check the error logs under their respective folders. If no errors, then navigate in a browser to http://localhost:8080, which should redirect to a xampp folder if everything worked. On each machine you anticipate to be working from, you'll need the Dropbox application on that machine logged into your account.
Another option, which I've used before is to install xampp onto a USB disk, which works just as well. I like this option, because I don't have to carry a USB disk with me.
Any problems or further suggestions, let me know. Also, I've installed both Drupal and Wordpress and been able to access and develop them from multiple machines.