您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

XAMPP配置虚拟主机具体步骤

2024/4/21 6:47:22发布15次查看
1.安装xampp安装包到d盘,安装完成后,退出xampp集成环境,进入下一步,配置虚拟主机;首先在xampp/htdocs目录下新建目录magento2和test文件夹(此文件夹为你的项目全部内容)。
ps.在创建多个虚拟主机时,也需要新建一个文件夹包含你的项目全部内容如magento2和test,如果还需要创建则再创建相应文件夹。
2.找到你的xampp安装目录,依次打开以下目录:apache/conf/extra目录找到httpd-vhosts.conf文件,用记事本打开。
3.打开http-vhosts.conf后,在最下面添加如下代码:
servername www.magento2.com documentroot d:/xampp/htdocs/magento2 options followsymlinks includesnoexec indexes directoryindex index.html index.htm index.php allowoverride all order deny,allow allow from all require all granted servername www.test.com documentroot d:/xampp/htdocs/test options followsymlinks includesnoexec indexes directoryindex index.html index.htm index.php allowoverride all order deny,allow allow from all require all granted
4.此外,需要配置c盘host文件,依次找到下面的目录:c盘/windows/system32/drivers/etc目录,找到hosts文件,用记事本打开,添加127.0.0.1 www.magento2.com 保存,如:
127.0.0.1 www.magento2.com127.0.0.1 www.test.com
5.配置虚拟主机完成,重启xampp集成环境即可。
以上就介绍了xampp配置虚拟主机具体步骤,包括了方面的内容,希望对php教程有兴趣的朋友有所帮助。
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product