windows下面 apache 虚拟主机配置
时间:2014-05-16 04:36:42
收藏:0
阅读:468
<VirtualHost 192.168.0.20:81> ServerAdmin www.test2.com DocumentRoot "D:/PHP/Apache/htdocs/testSite2" <Directory "D:/PHP/Apache/htdocs/testSite2"> Options Indexes FollowSymLinks AllowOverride None Order allow,deny Allow from all </Directory> </VirtualHost> 这样我们就可以用192.168.0.20:81访问testsite2了。 如果想在internet访问IP地址必须是静态的上述情况还可能报错,you have no permi to acess !
还需要在allow from all前面加入##############VirtualHost*#主机监听端口默认是是83#############
Alias /www "D:/www"
<Directory "D:/www">
Options Indexes MultiViews
AllowOverride All
Order allow,deny
Allow from all
Require all granted
DirectoryIndex default.php
</Directory>
评论(0)