一、 XAMPP安装
官网下载地址:https://www.apachefriends.org/download.html
根据自己的需要下载对应的版本,下载后按照提示安装即可
注:本人的安装路径为 D:\xampp 网站根目录D:\xampp\htdocs
二、配置方法
-
创建2个网站目录,存放不同的程序如a b
D:\xampp\htdocs\a
D:\xampp\htdocs\b
注:域名可以根据项目任意命名 -
多域名配置
1. 修改C:\Windows\System32\drivers\etc 下的host
2. 修改D:\xampp\apache\conf\extra\httpd-vhosts.conf 如:> <VirtualHost *:80> DocumentRoot "D:/xampp/htdocs/a" ServerName www.a.com <Directory "D:/xampp/htdocs/a/"> Options FollowSymLinks IncludesNOEXEC Indexes DirectoryIndex index.php index.html index.shtml AllowOverride All Order Deny,Allow Allow from all </Directory> </VirtualHost>