第一步:安装XAMPP,这是基础性托管环境搭建(网站根目录:xampp\htdocs)。
(1)通过网站下载xampp安装包:
XAMPP Installers and Downloads for Apache Friends得到xampp-windows-x64-8.0.28-0-VS16-installer.exe。
(2)运行exe文件,安装的时候安装在D:\xampp,最后一步默认勾选打开面板。
(3)打开面板XAMPP Control Panel时出现的端口报错记下来,后面要改。
(4)鼠标点击下Service下面的❌,提示安装,确定,安装完成后变成✔。
(5)设置配置文件:
把httpd.conf中的80端口全部修改为8082,httpd-ssl.conf中的443端口全部修改为4433,config.inc.php中修改以下地方:
/* Authentication type and info */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '此密码是数据库的密码';
/* Bind to the localhost ipv4 address and tcp */
$cfg['Servers'][$i]['host'] = '127.0.0.1:3307';
/* User for advanced features */
$cfg['Servers'][$i]['controluser'] = 'root';
$cfg['Servers'][$i]['controlpass'] = '123456';