Apache HTTP Server /etc/apache2/conf.d/info.conf

原始 📋 Alpine Linux v3.21 40 行

适用于

当前查看:
Alpine Linux v3.21
相同于:
其他版本:

详情

大小
40 行
MD5
6fbbe7cb94f43d61ef4c57eee7b7ca9f
SHA256
15a9acc18910e569d49854e8a3aafca442f94df9a7ea14bbd365bf30d8660020
/etc/apache2/conf.d/info.conf
#
# Get information about the requests being processed by the server
# and the configuration of the server.
#
# Required modules: mod_authz_core, mod_authz_host,
#                   mod_info (for the server-info handler),
#                   mod_status (for the server-status handler)

<IfModule status_module>
#
# Allow server status reports generated by mod_status,
# with the URL of http://servername/server-status
# Change the ".example.com" to match your domain to enable.

<Location /server-status>
    SetHandler server-status
    Require host .example.com
    Require ip 127
</Location>

#
# ExtendedStatus controls whether Apache will generate "full" status
# information (ExtendedStatus On) or just basic information (ExtendedStatus
# Off) when the "server-status" handler is called. The default is Off.
#
#ExtendedStatus On
</IfModule>

<IfModule info_module>
#
# Allow remote server configuration reports, with the URL of
#  http://servername/server-info (requires that mod_info.c be loaded).
# Change the ".example.com" to match your domain to enable.
#
<Location /server-info>
    SetHandler server-info
    Require host .example.com
    Require ip 127
</Location>
</IfModule>

复制粘贴

curl:
curl https://exampleconfig.com/api/v1/config/original/6fbbe7cb94f43d61ef4c57eee7b7ca9f?hint=info.conf
wget:
wget -O info.conf https://exampleconfig.com/api/v1/config/original/6fbbe7cb94f43d61ef4c57eee7b7ca9f?hint=info.conf

给 AI Agent 用

<prompt><role>DevOps agent</role><source url='https://exampleconfig.com/api/v1/config/original/6fbbe7cb94f43d61ef4c57eee7b7ca9f?hint=info.conf' /><config><app>Apache HTTP Server</app><os>Alpine Linux v3.21</os><location>/etc/apache2/conf.d/info.conf</location><lines>40</lines><md5>6fbbe7cb94f43d61ef4c57eee7b7ca9f</md5><sha256>15a9acc18910e569d49854e8a3aafca442f94df9a7ea14bbd365bf30d8660020</sha256></config></prompt>

粘贴到 Claude、ChatGPT 或任何 AI 助手里。

安装 Apache HTTP Server

Alpine Linux

sudo apk add apache2

Debian

sudo apt update && sudo apt install apache2

Red Hat Enterprise Linux

sudo yum install httpd

Ubuntu

sudo apt update && sudo apt install apache2

文件位置

文件路径
/etc/apache2/conf.d/info.conf
目录
/etc/apache2/conf.d/
用途
系统级配置目录
说明
/etc/ 里的文件是系统级配置,影响所有用户。

FAQ

什么时候该用这个 info.conf?

用来恢复缺失的默认文件、确认发行版本带了什么,或拿你的 Apache HTTP Server config 做 diff。

怎么恢复 Apache HTTP Server 的默认配置?

下载文件,把 /etc/apache2/conf.d/info.conf 里的当前配置备份好,替换掉,然后 reload 或 restart Apache HTTP Server。

info.conf 适合直接上生产吗?

这是 Alpine Linux v3.21 的厂商默认配置,只能当基线。上生产前请检查安全和性能设置。

和其他 OS 版本有什么不同?

默认值会随发行版和版本变化,这份对应 Alpine Linux v3.21。

我可以用它来排查 Apache HTTP Server 吗?

可以。和你的配置做 diff 找出漂移,然后只恢复需要的段落。