Change Web Root Path for XAMPP on Windows

I had an existing XAMPP install on a shared location that I wanted to access using a laptop with its own local XAMPP install. I didn’t want to do any heavy lifting with the laptop, just wanted to access the web files on the shared server through the laptop’s localhost.

I also didn’t want to relocate the entire XAMPP folder on my laptop, so I instead modified the httpd.conf file on my local XAMPP install to point to the web root of the remote XAMPP install.

Here’s what I did:

  1. Locate httpd.conf file on my local XAMPP install: C:\xampp\xampp\apache\conf\httpd.conf
  2. Edit the “DocumentRoot” line to the location of the remote \htdocs folder. I changed mine from:
    “C:/xampp/xampp/htdocs” to “C:/Users/Ann/Documents/My Dropbox/Dev/Xampp/xampp/htdocs”
  3. Edit the “Directory” tag to the same remote location you set for DocumentRoot. My Directory tag looked like Directory “C:/Users/Ann/Documents/My Dropbox/Dev/Xampp/xampp/htdocs”
  4. Save the file and restart your local Apache server.
  5. Navigate to “http://localhost/” in your browser and you should see the remote web site files.

Subscribe to comments Comment | Trackback |
Post Tags:

Browse Timeline


Comments ( 4 )

Hi Ann, I like to design & build on my Mac & test on windows.
so for so good with windows,
but I want to do the same with an OSX system…
Any best practices or suggested ideas?

Thanks
Phil

Phil D added these pithy words on Nov 13 10 at 11:58 pm

Hi Phil, I wish I had some suggestions for you but my dev experience on Macs is pretty limited. I hope to snag myself a MacBook soon and change that. :)

Ann added these pithy words on Nov 16 10 at 10:29 pm

Hey thank you very much i am web developer was always worried if i lost my work data from my C drive. today i have changed my directory :D

Muhammad Ateeq Rafeeq added these pithy words on Apr 07 11 at 11:19 am

But can we also change the location of database as well, as this is also important in terms of latest database to keep.
hope web developers get me ;-)

Aslam Shahid added these pithy words on Aug 26 11 at 10:33 am

Add a Comment


XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>


© Copyright 2009-2010 Alpha Papa Hotel . Thanks for visiting!