Virtual host is what I believe you need to set up in the .\xampp\apache\conf\extra\httpd-vhosts.conf
Before you start setting up a vhost it would pay you to revert your httpd.conf
file to the defaults that came with XAMPP when you installed it.
Configuring the httpd-vhosts.conf
file will permit you to retain the XAMPP localhost admin pages and allow you to do what you want with as many domain names as you wish.
First off do some research by searching these English forums for keyword vhost
and because you want to use a folder outside the localhost htdocs folder you will need to configure each vhost container with overriding permissions that are set to be restrictive in the httpd.conf
file for any folder outside the htdocs folder for obvious reasons - you don't want those script kiddies roaming just where they please via your apache server.
Just to try and give you a clue for one of your domains, I put together this httpd-vhosts.conf
example just to get you started with understanding what it is all about - tip is to create one at a time and get that domain running smoothly then add another and get that working and so on for as many as you need (I have 17 domains and sub-domains up and running both local and from the Internet).
Drop the use of test
in your domain names as it can give issues and so I have not used it in this example.
Would be suitable names but of course mysite is only an example.
- Code: Select all
<Directory "F:/Documents/mysite" >
Options Indexes +FollowSymLinks Includes ExecCGI
Allow from all
ScriptAlias /cgi-bin/ "F:/Documents/mysite/cgi-bin/"
CustomLog logs/mysite.log combined
You also have to add some values to your HOSTS file.
Drag the file into yout text editor and add these if they are not included.
(plus you add any more you create in the httpd_vhosts.conf file.
The above example will also allow your .htaccess file in the root web folder (mysite) of your domain mysite.com - I prefer not to use .com in a folder name of my domains but simply to use the domain name only.
Apache server is case sensitive and if possible try and keep folders (Documents to documents) and file names all lower case to eliminate confusion and the inevitable error - Windows couldn't care less but Apache does.
Keep the httpd.conf file defaults and do your configurations for your domains in the httpd-vhosts.conf file - make sure your XAMPP installations works on http://localhost
and goes to the XAMPP Admin pages then proceed to configure the httpd_vhosts.conf file.
There are plenty of examples in the search results I mentioned above for you to get your teeth into.
Now it's up to you to have a go and see how it pans out - there is always help on these forums if you get hopelessly bogged down.