Apache2.4.9 多域名多网站配置

来源:互联网 发布:kmp next函数算法流程 编辑:程序博客网 时间:2024/05/17 02:07

Apache2.4.9 多域名多网站配置 



1:先打开apache目录下的配置文件httpd.conf(在conf目录下),找到#Include conf/extra/httpd-vhosts.conf这句,将之前的#号去掉,开启虚拟主机配置。
2:在conf/extra/httpd-vhosts.conf中进行虚拟主机的配置操作;也可以在httpd.conf直接写入配置,但是不建议这么做;尽量做到配置分离,解耦。在文件中添加以下示例配置:<VirtualHost *:80>DocumentRoot "D:/wamp/www/"ServerName bbs.tuling.com<Directory "D:/wamp/www/">Options FollowSymLinks
AllowOverride all    Require all granted</Directory></VirtualHost>
ServreName为域名名称
DocumentRoot为网站目录
2 0
原创粉丝点击