Quantcast
Channel: 开飞机的小蜗牛 » apache
Viewing all articles
Browse latest Browse all 2

wampserver 不能显示 icons 里的图片

$
0
0

环境:win7, wampserver2.2e-php5.4.3-httpd2.2.22-mysql5.5.24-32b.exe 安装位置为:D:/wamp/

在网站目录下,我有一个文件夹 my-folder 里面有一些文件,因为没有 index.php index.html index.htm 等文件,所以 apache 列出了 my-folder 下的所有文件,但是,问题在于,没有显示前面的图片,很难看。

查看 apache error 文件发现提示错误:

[Wed May 29 22:58:43 2013] [error] [client 127.0.0.1] client denied by server configuration: C:/Apache2, referer: http://localhost/my-folder/

访问 http://localhost/icons/ 显示 403 无权限。

很无解,因为我的 wampserver 安装在 D 盘,相关配置文件也在 D:\wamp\bin\apache\apache2.2.22\conf 文件夹下,为什么提示错误说在 C:/Apache2。

第一次遇见这个问题,我尝试搜索了一番,无果。今天再搜索,竟然找到问题所在了。

下面解决方案来自 http://serverfault.com

To fix the icon problem, I had to edit httpd-autoindex.conf located in \bin\apache\apache2.2.22\conf\extra

I changed

Alias /icons/ "c:/apache2/icons/"

to

Alias /icons/ "D:/wamp/bin/apache/apache2.2.22/icons/"

and

<Directory "c:/apache2/icons">

to

<Directory "D:/wamp/bin/apache/apache2.2.22/icons/">

The icons will now display as per usual.

Many thanks to Ladadadada for pointing me in the right direction!


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images