Apache 在自动生成索引时使用图标目录中的哪些图标?

发布于 2025-01-13 08:39:03 字数 1505 浏览 2 评论 0原文

Apache的mod_autoindex模块可以生成索引如果没有用户创建的 index.html 文件,则为文件数。使用 FancyIndexing 选项 打开后,Apache 还会根据文件名在文件旁边添加一个图标。

在这些图标所在的 /usr/share/apache2/icons 目录中,有 74 个不同的图标(我只计算了正确大小的 gif)。

这些图标是:

a.gif
alert.black.gif
alert.red.gif
back.gif
ball.gray.gif
ball.red.gif
binary.gif
binhex.gif
blank.gif
bomb.gif
box1.gif
box2.gif
broken.gif
burst.gif
c.gif
comp.blue.gif
comp.gray.gif
compressed.gif
continued.gif
dir.gif
diskimg.gif
down.gif
dvi.gif
f.gif
folder.gif
folder.open.gif
folder.sec.gif
forward.gif
generic.gif
generic.red.gif
generic.sec.gif
hand.right.gif
hand.up.gif
image1.gif
image2.gif
image3.gif
index.gif
layout.gif
left.gif
link.gif
movie.gif
p.gif
patch.gif
pdf.gif
pie0.gif
pie1.gif
pie2.gif
pie3.gif
pie4.gif
pie5.gif
pie6.gif
pie7.gif
pie8.gif
portal.gif
ps.gif
quill.gif
right.gif
screw1.gif
screw2.gif
script.gif
sound1.gif
sound2.gif
sphere1.gif
sphere2.gif
tar.gif
tex.gif
text.gif
transfer.gif
unknown.gif
up.gif
uu.gif
uuencoded.gif
world1.gif
world2.gif

我发现和旧帖子声称“在所有他们只使用 25"。

这是真的吗?自动索引中实际使用了哪些图标?

我想创建自己的一组图标,所以我想知道哪些图标是我应该创建的,哪些是不使用的。

Apache's mod_autoindex module can generate an index of files if there's no user-created index.html file. With the FancyIndexing option turned on, Apache also adds an icon next to the file based on its filename.

In the /usr/share/apache2/icons directory that these icons come from, there's 74 different icons (I'm only counting gifs of the right size).

Those icons are:

a.gif
alert.black.gif
alert.red.gif
back.gif
ball.gray.gif
ball.red.gif
binary.gif
binhex.gif
blank.gif
bomb.gif
box1.gif
box2.gif
broken.gif
burst.gif
c.gif
comp.blue.gif
comp.gray.gif
compressed.gif
continued.gif
dir.gif
diskimg.gif
down.gif
dvi.gif
f.gif
folder.gif
folder.open.gif
folder.sec.gif
forward.gif
generic.gif
generic.red.gif
generic.sec.gif
hand.right.gif
hand.up.gif
image1.gif
image2.gif
image3.gif
index.gif
layout.gif
left.gif
link.gif
movie.gif
p.gif
patch.gif
pdf.gif
pie0.gif
pie1.gif
pie2.gif
pie3.gif
pie4.gif
pie5.gif
pie6.gif
pie7.gif
pie8.gif
portal.gif
ps.gif
quill.gif
right.gif
screw1.gif
screw2.gif
script.gif
sound1.gif
sound2.gif
sphere1.gif
sphere2.gif
tar.gif
tex.gif
text.gif
transfer.gif
unknown.gif
up.gif
uu.gif
uuencoded.gif
world1.gif
world2.gif

I found and old post that claims "Out of all of them it only uses 25".

Is this true? Which of the icons are actually used in the auto index?

I'd like to create my own set of icons, so I want to know which ones I should actually create and which ones aren't used.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

才能让你更想念 2025-01-20 08:39:03

我找到了答案 服务器故障

mod_autoindex 的默认配置在名为 extra/httpd-autoindex.conf 的文件中定义。

#
# AddIcon* directives tell the server which icon to show for different
# files or filename extensions.  These are only displayed for
# FancyIndexed directories.
#
AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip

AddIconByType (TXT,/icons/text.gif) text/*
AddIconByType (IMG,/icons/image2.gif) image/*
AddIconByType (SND,/icons/sound2.gif) audio/*
AddIconByType (VID,/icons/movie.gif) video/*

AddIcon /icons/binary.gif .bin .exe
AddIcon /icons/binhex.gif .hqx
AddIcon /icons/tar.gif .tar
AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
AddIcon /icons/a.gif .ps .ai .eps
AddIcon /icons/layout.gif .html .shtml .htm .pdf
AddIcon /icons/text.gif .txt
AddIcon /icons/c.gif .c
AddIcon /icons/p.gif .pl .py
AddIcon /icons/f.gif .for
AddIcon /icons/dvi.gif .dvi
AddIcon /icons/uuencoded.gif .uu
AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
AddIcon /icons/tex.gif .tex
AddIcon /icons/bomb.gif core

AddIcon /icons/back.gif ..
AddIcon /icons/hand.right.gif README
AddIcon /icons/folder.gif ^^DIRECTORY^^
AddIcon /icons/blank.gif ^^BLANKICON^^

#
# DefaultIcon is which icon to show for files which do not have an icon
# explicitly set.
#
DefaultIcon /icons/unknown.gif

这是整个文件供参考: https://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/extra/httpd-autoindex.conf.in

所以答案是默认情况下,索引中使用这 25 个图标:

  • 压缩
  • .gif 文本
  • .gif 图像
  • 2.gif 声音2.gif
  • 电影.gif
  • 二进制.gif
  • binhex.gif
  • tar.gif
  • 世界2.gif
  • a.gif
  • 布局
  • .gif 文本.gif
  • c.gif
  • p.gif
  • f.gif
  • dvi.gif
  • uuencoded.gif
  • script.gif
  • tex.gifomb.gif
  • back.gif
  • hand.right.giffolder.gif
  • 更多
  • 内容
  • Blank.gifunknown.gif
  • 添加

当然,还可以使用 AddIcon 指令

I found the answer on serverfault!

The default configuration for mod_autoindex is defined in a file called extra/httpd-autoindex.conf.

#
# AddIcon* directives tell the server which icon to show for different
# files or filename extensions.  These are only displayed for
# FancyIndexed directories.
#
AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip

AddIconByType (TXT,/icons/text.gif) text/*
AddIconByType (IMG,/icons/image2.gif) image/*
AddIconByType (SND,/icons/sound2.gif) audio/*
AddIconByType (VID,/icons/movie.gif) video/*

AddIcon /icons/binary.gif .bin .exe
AddIcon /icons/binhex.gif .hqx
AddIcon /icons/tar.gif .tar
AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
AddIcon /icons/a.gif .ps .ai .eps
AddIcon /icons/layout.gif .html .shtml .htm .pdf
AddIcon /icons/text.gif .txt
AddIcon /icons/c.gif .c
AddIcon /icons/p.gif .pl .py
AddIcon /icons/f.gif .for
AddIcon /icons/dvi.gif .dvi
AddIcon /icons/uuencoded.gif .uu
AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
AddIcon /icons/tex.gif .tex
AddIcon /icons/bomb.gif core

AddIcon /icons/back.gif ..
AddIcon /icons/hand.right.gif README
AddIcon /icons/folder.gif ^^DIRECTORY^^
AddIcon /icons/blank.gif ^^BLANKICON^^

#
# DefaultIcon is which icon to show for files which do not have an icon
# explicitly set.
#
DefaultIcon /icons/unknown.gif

Here's the whole file for reference: https://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/extra/httpd-autoindex.conf.in

So the answer is that by default, these 25 icons are used in the index:

  • compressed.gif
  • text.gif
  • image2.gif
  • sound2.gif
  • movie.gif
  • binary.gif
  • binhex.gif
  • tar.gif
  • world2.gif
  • a.gif
  • layout.gif
  • text.gif
  • c.gif
  • p.gif
  • f.gif
  • dvi.gif
  • uuencoded.gif
  • script.gif
  • tex.gif
  • bomb.gif
  • back.gif
  • hand.right.gif
  • folder.gif
  • blank.gif
  • unknown.gif

Of course, more can be added with the AddIcon Directive

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文