Tip for easy infinite testing domains (*.localhost) on Xampp

Alles, was den Apache betrifft, kann hier besprochen werden.

Tip for easy infinite testing domains (*.localhost) on Xampp

Postby davidjimenez75 » 07. August 2019 10:04

1) Activate the vhost module of apache (removing the #).

FILE=C:\xampp\apache\conf\httpd.conf
Code: Select all
LoadModule vhost_alias_module modules/mod_vhost_alias.so


2) Add this to the end of the vhosts file of apache.


FILE=C:\xampp\apache\conf\extra\httpd-vhosts.conf
Code: Select all
UseCanonicalName Off
<VirtualHost *:80>
       DocumentRoot "C:/xampp/htdocs/"
       ServerName localhost
</VirtualHost>
<VirtualHost *:80>
       ServerAlias *.localhost
       VirtualDocumentRoot "C:/xampp/htdocs/%1/"
</VirtualHost>


3) create as much folders as you want in C:/xampp/htdocs/

4) Start Xampp

Works OK on Chrome (not in Firefox) :(
davidjimenez75
 
Posts: 3
Joined: 29. October 2017 09:58
XAMPP version: 7.1.10
Operating System: Windows 10

Return to Apache

Who is online

Users browsing this forum: No registered users and 3 guests