XAMPP项目目录自定义后403 Access Forbidden

XAMPP安装过程不细述了,先来简单回顾一下XAMPP配置:

\xampp\apache\conf\extra\httpd-vhosts.conf

<VirtualHost *:80>
    ServerAdmin postmaster@domain.td
    DocumentRoot "盘符:/路径/项目目录"
    ServerName domain.td      # domain.td 为自定义服务器名,只要你喜欢...随意
    ServerAlias www.domain.td   # www.domain.td 为项目localhost访问的域名别名,和上面对应
    ErrorLog "logs/domain.td-error.log"  # 生成日志文件,文件名随意
    CustomLog "logs/domain.td-access.log" combined  # 生成日志文件,文件名随意
</VirtualHost>

 

C:\Windows\System32\drivers\etc\hosts

127.0.0.1       www.domain.td

 

 

【系统环境】

  win7

 

【问题】

   设置好项目访问的域名别名之后,打开浏览器访问  www.domain.td  发现 403 Access Forbidden

 

【解决方法】

  经过一番google之后,锁定 \xampp\apache\conf\httpd.conf 文件,E字看着真心累啊

<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    # deny from all    # 原先的默认设置
    Allow from all    # 改成 Allow 问题解决
</Directory>

 

posted @ 2015-05-20 19:38  冷冬.sirius  阅读(3063)  评论(0编辑  收藏  举报