使用Apache服务器无法访问在一个子目录的文件 [英] Can't access files in a subdirectory using Apache server
问题描述
我已经安装了Windows 7计算机上的一个Apache 2.2.21服务器。
我的网站,并将其从 /脚本
子目录我的剧本正在努力,但是当我尝试加载从 /图标
图标我得到一个403 Forbidden错误。
我已经添加到了我的的httpd.conf
文件:
I have an Apache 2.2.21 server installed on my Windows 7 machine.
My site is up and my scripts from /scripts
subdirectory are working but when I try to load icons from /icons
I get a 403 forbidden error.
I've already added this to my httpd.conf
file:
<Directory "c:/wamp/www/icons/">
Options Indexes FollowSymLinks
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
</Directory>
仍然没有效果。所以,问题是:我怎么能在我的 /图标
子文件夹访问文件
P.S:使用 /图片
子目录制定了就好了,但问题仍然存在。
P.S.: Using /images
subdirectory worked out just fine but the question still remains.
推荐答案
我想通了, /图标/
被列为一些其他目录的别名。对我来说,配置文件位于:
I figured out that /icons/
was included as an alias for some other directory. For me, configuration file was located at:
C:\wamp\bin\apache\apache2.2.21\conf\extra\httpd-autoindex.conf
我不得不注释掉该行:
I had to comment out this line:
Alias /icons/ "c:/Apache22/icons/"
这篇关于使用Apache服务器无法访问在一个子目录的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!