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:
- Locate httpd.conf file on my local XAMPP install: C:\xampp\xampp\apache\conf\httpd.conf
- 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” - 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”
- Save the file and restart your local Apache server.
- Navigate to “http://localhost/” in your browser and you should see the remote web site files.
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
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.
![]()
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
![]()
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![]()