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.
Comments ( 19 )
Add a Comment
You must be logged in to post a comment.