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}>LqzQ摎Q9N۩;`ե? Li#DžJh໑G%FI˄ue0~UL?hsK0;U ױ+Ph*?o6\XJ`3LFH S⊧gg8n keO,d@6Xt DmZV (2sr|R( ;ٮZqt]ʻW]ٱn#X$tp{bS)~rf|"wd)97`hZ$H"3eHɛ e>[e"k`<,NZpXN0xig.c/rpVNg/=s#vEFPLW?#3׾r37P-&?7"5>paU* պ Kϥy[D{E8 $ʢyJNYCWr)?6oC~*Ҡψ iz?A4 :& < kR*&sg",%\ydi$aZKHy-"5˃JO.7Q=+̬`,i?G]@I )<&v,sG;p{"hB!^"+}\ΚEBFQv+tb$" !ҊR[OrlqqF$t̐Hֲ׋~v >2y84:2^X}TGΉo6 _yW$uN`[O)3e٤A46R9JI@|{ ƺ%CjALe7n%!` (|sE4#A,l92'$[ 2CϿ`矗);YM:s{0#1Y*q"Ț/SDpЦL VCG s[t>ŗ^_]mYteH,xꂶf\޿xv8VF6$&EL_qUm߱}q7㑊@UǁH?3kޯgS*P-1%"l12 _S 8VߊP?Yʼn'/#%Bw=84$ ^XKV&)6 I$ЗlFj&C);eѠeŀSLjKHQ^pO 2.]nQ]@\N阮Pe|)?akLJ44 {=^qR@zK/xx&=x'X B1ok_Ā 科I1/yJo (9 I{u%뤋omain.localhost are automatically served by the subdomain/ directory of the main server document root. Follow the steps below: . Change to your XAMPP installation directory (typically, C:\xampp) and open the httpd.conf file in the apache\conf\ subdirectory using your favourite text editor. Within the file, find the following line and uncomment it by removing the hash symbol (#) at the beginning of the line.

LoadModule vhost_alias_module modules/mod_vhost_alias.so
  1. Next, edit the httpd-vhosts.conf file in the apache\conf\extra\ subdirectory of your XAMPP installation directory.

  2. Replace the contents of this file with the following directives:

    UseCanonicalName Off
    <VirtualHost *:80>
           DocumentRoot "C:/xampp/htdocs/"
           ServerName localhost
    </VirtualHost>
    <VirtualHost *:80>
           ServerAlias *.localhost
           VirtualDocumentRoot "C:/xampp/htdocs/%1/"
    </VirtualHost>
    image1

    In this configuration, the first virtual host block configures how requests are handled by default. The second block configures wildcard virtual hosting for subdomains, such that requests for subdomain.localhost are automatically served by the subdomain\ directory of the C:\xampp\htdocs\ directory. In particular, notice the %1 placeholder, which matches the subdomain name from the request URL.

  3. Restart Apache using the XAMPP control panel for your changes to take effect.

    image2

At this point, your wildcard subdomains are configured. You can easily test this by using the Windows Explorer to create two new subdirectories at C:\xampp\htdocs\app01\ and C:\xampp\htdocs\app02\. Within each subdirectory, create a file named index.html and fill it with some sample HTML content. Use different content for each file, so that you can easily distinguish that they’re being served from different directories - for example:

<!-- index.html in app01 directory -->
<html>
 <head></head>
 <body>
  <h1>Welcome to app01.localhost!</h1>
 </body>
</html>
<!-- index.html in app02 directory -->
<html>
 <head></head>
 <body>
  <h1>Hello from app02.localhost!</h1>
 </body>
</html>

Since these domains do not actually exist in reality, you also need to map them to the local IP address. Open the file C:\windows\system32\drivers\etc\hosts in a text editor and add the following line to it:

127.0.0.1           app01.localhost   app02.localhost
image3
You will need to do this every time you want to configure a new wildcard virtual host, because the Windows hosts file does not support wildcard entries. To avoid this step, you can use a DNS server or local DNS proxy that supports wildcards and therefore takes care of automatically resolving requests for *.localhost to the local IP address.
On some versions of Windows, you will not be able to edit the C:\windows\system32\drivers\etc\hosts file without administrator privileges. You can edit the file by right-clicking the Notepad icon and selected the "Run as administrator" menu option, then entering administrator credentials (if required) and clicking "OK" or "Yes" to proceed.

At this point, you should be able to enter the URLs http://app01.localhost or http://app02.localhost in your browser’s address bar, and you should then see the corresponding HTML page.

image4