apache 配置默认目录外当虚拟目录

添加虚拟目录

再vhost文件里添加

<VirtualHost *:80>
    DocumentRoot "/xampp/v9"
    ServerName www.v9.com
    ErrorLog "logs/www.v9.log"
    CustomLog "logs/www.v9.log" combined
</VirtualHost>

出现限制权限访问,

Access forbidden!

You don't have permission to access the requested object. It is either read-protected or not readable by the server.

If you think this is a server error, please contact the webmaster.

Error 403

localhost
2011/8/26 17:36:49
Apache/2.2.17 (Win32) mod_ssl/2.2.17 OpenSSL/0.9.8o PHP/5.3.4 mod_perl/2.0.4 Perl/v5.10.1

 

需更改目录设置

<Directory "C:/xampp/htdocs/test/">

    AllowOverride None

    Options None

    Order allow,deny

    Allow from all

</Directory>


<Directory "C:/xampp/htdocs/test/"> 改成 <Directory "/">

问题解决




评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值