XAMPP Configuring a virtual Host
XAMPP Configuring a virtual host First step: Add the Virtual Host configuration in apache/conf/extra/httpd-vhosts.conf:
ServerAdmin a@a.com
DocumentRoot "E:/phpproj/test"
ServerName test.com
Serveralias www.test.com
Errorlog "Logs/test-error.log"
Customlog "Logs/test-access.log" combined
You can add multiple
ServerAdmin a@a.com
DocumentRoot "E:/phpproj/aa"
ServerName aa.com
Serveralias www.aa.com
Errorlog "Logs/aa-error.log"
Customlog "Logs/aa-access.log" combined
The second step: in the apache/conf/httpd.conf
Omitted....
Change into
Options FollowSymLinks
AllowOverride None
Order Deny,allow
Allow from all
The third step is to modify the Hosts file
127.0.0.1 test.com www.test.com
127.0.0.1 aa.com www.aa.com
OK finish
The above describes the XAMPP configuration virtual host, including the aspects of the content, I hope that the PHP tutorial interested in a friend helpful.