Translation(s): English - Italiano - Português Brasileiro - 简体中文 - Русский


WebServers > Apache


Apache 服务器

Debian 下安装 Apache 服务器

Debian 下安装 apache2 很容易,只需运行命令: apt-get install apache2 即可。

APT 将自动选择一个引擎,通常为 apache2-mpm-preforkapache2-mpm-worker (apache2-mpm-eventapache2-mpm-itk 不推荐).。

脚本 / 动态内容

Apache 可以通过 CGI 或 FastCgi (libapache2-mod-fcgid)使用任意的外部程序和脚本语言。

Apache 也内嵌了很多脚本解释器或连接到一个应用服务器来生成动态内容:

模块

Debian 中有很多 Apache 的模块,这些模块软件包名称通常有个前缀:libapache2-mod

安装完毕后,模块可通过命令 a2enmoda2dismod 来启用/禁用。

其他事项

apt-cache search apache | less

常见问题

Apache user (www-data)
Debian's Apache packages come configured to run as user 'www-data'. This is potentially confusing: files to be served by apache should not be owned by 'www-data', as apache should not normally be allowed to modify them (i.e. as long as you're not running a wiki).
Apache v1.3

Apache.org is officially encouraging users to switch to apache v2.2. DebianLenny and later releases, don't ship Apache v1.x.
(apache 1.3 release notes: "We strongly recommend that users of all earlier versions, including 1.3 family release, upgrade to to the current 2.2 version as soon as possible.")

升级
See /usr/share/doc/apache2.2-common/NEWS.Debian.gz
功能增强

Apache/Hardening

打包模块

Apache/PackagingModules

另见