xampp Configure virtual host
xampp The first step to configure virtual host: add virtual host configuration in apache/conf/extra/httpd-vhosts.conf: such as
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
Step 2: In apache/conf/httpd In .conf, omit
....
to
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 completed
The above introduces the xampp configuration virtual host, including the content. I hope it will be helpful to friends who are interested in PHP tutorials.