Apache2.4.9 多域名多网站配置

Apache2.4.9 多域名多网站配置 

 

 

1:先打开apache目录下的配置文件httpd.conf(在conf目录下),找到#Include conf/extra/httpd-vhosts.conf这句,将之前的#号去掉,开启虚拟主机配置。
2:在conf/extra/httpd-vhosts.conf中进行虚拟主机的配置操作;也可以在httpd.conf直接写入配置,但是不建议这么做;尽量做到配置分离,解耦。在文件中添加以下示例配置:


	DocumentRoot "D:/wamp/www/"
	ServerName bbs.tuling.com
	
		Options FollowSymLinks
		AllowOverride all
    		Require all granted
	

ServreName为域名名称

DocumentRoot为网站目录

你可能感兴趣的:(Apache2.4.9 多域名多网站配置)