网站运维:Windows的xampp的Apache配置虚拟主机

1、配置httpd.conf

在c:\xampp\apache\conf目录下,打开httpd.conf
改成下面这样

# Virtual hosts……虚拟主机
Include conf/extra/httpd-vhosts.conf
#DocumentRoot "c:/xampp/htdocs"

2、配置httpd-vhosts.conf

在C:\xampp\apache\conf\extra文件夹下,打开httpd-vhosts.conf
添加

#80端口
<VirtualHost *:80>
#管理员邮箱
    ServerAdmin [email protected]
    #网站主文件夹
    DocumentRoot "C:/xampp/htdocs/"
    #网址
    ServerName www.abc.com
	
</VirtualHost>

猜你喜欢

转载自blog.csdn.net/weixin_43731793/article/details/93054872