当前位置首页 > Apache知识

[php]apache虚拟主机配置

阅读次数:286 次  来源:admin  发布时间:

1、所谓虚拟主机的配置,即url与磁盘目录的绑定

2、在httpd.conf中查询Virtual host,发现有注释说明需要在conf/extra/httpd-vhosts.conf中进行配置。

3、模板:

 1 <VirtualHost 127.0.0.1:80>
 2     DocumentRoot "d:/myweb"
 3     DirectoryIndex indx.html index.thm index.php
 4     <Directory/>
 5     Options FollowSymLinks
 6     #不许别人修改自己页面
 7     AllowOverride None
 8     #访问权限
 9     Order allow,deny
10     Allow from all
11     </Directory>
12 </VirtualHost>
上一篇:Ubuntu16.04配置静态ip
下一篇:使用Hyper-V安装Ubuntu虚拟机