I want to browse mysite with this URL, and that doesn't quite work when I try it because links within it have no concept of the "mysite" directory:http://localhost/mysite

I realize that I can edit httpd.conf to change "DocumentRoot" to point directly to my site, but then xampp's site breaks.

I also realize that I can move my site into the root of htdocs, and that works perfectly (when using http://localhost), but then what do I do when I have another site? I'd like to learn that sooner rather than later.

Apart from changing all the links in your web site, which is often nigh impossible, then perhaps your best solution would be to use a VirtualHost in the xampp\apache\conf\extra\httpd-vhosts.conf file - this method has a huge amount of flexibility and would do what you want quit easily.

This method would also allow you to use http://mysite instead of http://localhost/mysite and still be able to access XAMPP at either http://localhost or http://localhost/xampp - if you prefer, you can even place your mysite folder anywhere on your PC rather than under the htdocs folder by using this VirtualHost method.

Do an Advanced forum search and select the XAMPP for Windows forum then search for Key word vhost or virtualhost(you may use my name Izzy in the Author box if you wish to narrow the huge amount of posts on this subject)Select All available in the characters of posts box to see all the posts not just an abbreviated post.

After you give that a go and perhaps get stuck, then by all means post back with a copy and paste of your code in the httpd-vhosts.conf file so it can be checked out.

I notice the VirtualHost file is just a dummy file right now, when I expected to see the Xampp site already configured in it. Instead, the Xampp site seems to know where it should be by virtue of the httpd-xampp.conf settings file, which appears to have multiple uses, perhaps why it was used instead of VirtualHost. Are separate settings files normally used, or is that an exception?

An alternative to using a VirtualHost is to use an Alias Directive placed in the httpd-xampp.conf file and simply follow an example that is already in use in that configuration file for example the Alias for Webalizer - again using an Alias allows you to place your web site folder anywhere on your PC.

When ever you use a directory outside of the DocumentRoot (the htdocs folder in a default XAMPP) you have to set those permission lines because the defaults set in the httpd.conf file are very restrictive, for obvious security reasons...

...but if the folder is in the htdocs tree then the permission are covered for the htdocs and all sub-directories <Directory> directive and so don't need to be specified again - take a look in the httpd.conf file in between all the comments.

The order of Apache reading these conf files is first the httpd.conf file is read then those in the extra folder are read and the settings will override those duplicated settings in the httpd.conf file.