天天看点

apache2.2.9配置虚拟主机问题

  1、# Virtual hosts

Include conf/extra/httpd-vhosts.conf 现在的配置在单独的文件中 2、具体配置,照着example改吧 NameVirtualHost *:80 <VirtualHost *:80>

    ServerName localhost

    DocumentRoot "E:/apache2/htdocs"

     <Directory "E:/apache2/htdocs">

      AllowOverride All

      Options All     </Directory>

</VirtualHost> 3、修改C:/WINDOWS/system32/drivers/etc下hosts文件 增加127.0.0.1   localhost这样的ip hostname内容   内容的访问还和Directory有关,要不会无法访问   重启看看!!