标签: apache-httpd

无法编译 Apache:“错误,SSL/TLS 库丢失或无法使用”

  • Arch Linux 2011.08.19 (Linux 3.4.2 i686)
  • 阿帕奇 2.2.22 ? 2.2.22(重新编译并重新安装)
  • OpenSSL 1.0.1.c-1

这些细节可能无关紧要,但是:每次有可用升级时,我都会使用带有 custompkg 的 yaourt 从源代码构建 Apache,这样我就可以将 suexec docroot 更改为我想要的内容,而无需自己手动编辑 PKGBUILD。

在过去,这种方法完美无缺。但是,现在看来,无论出于何种原因,Apache 都无法编译。我刚刚进行了完整的系统升级,因此可能与此有关。

这是修改后的 PKGBUILD 中的配置行:

../configure --enable-layout=Arch \
    --enable-modules=all \
    --enable-mods-shared=all \
    --enable-so \
    --enable-suexec \
    --with-suexec-caller=http \
    --with-suexec-docroot=/srv/www \
    --with-suexec-logfile=/var/log/httpd/suexec.log \
    --with-suexec-bin=/usr/sbin/suexec \
    --with-suexec-uidmin=99 --with-suexec-gidmin=99 \
    --enable-ldap --enable-authnz-ldap \
    --enable-cache --enable-disk-cache --enable-mem-cache --enable-file-cache \
    --enable-ssl --with-ssl \
    --enable-deflate --enable-cgid \
    --enable-proxy --enable-proxy-connect \
    --enable-proxy-http --enable-proxy-ftp \
    --enable-dbd \
    --with-apr=/usr/bin/apr-1-config \
    --with-apr-util=/usr/bin/apu-1-config \
    --with-pcre=/usr \
    --with-mpm=${mpm}
Run Code Online (Sandbox Code Playgroud)

当我尝试构建时,它似乎运行良好,直到它到达 OpenSSL …

arch-linux make pacman openssl apache-httpd

7
推荐指数
1
解决办法
1万
查看次数

带有 chroot 环境的 suexec

我正在尝试使用 suexec 运行 mod_fcgid 的 chrooted Apache 环境。

查看jail 内的suexec 日志,包装脚本的执行没有任何问题,但是,当我查看Apache 的错误日志时,我看到了以下错误;

suexec failure: could not open log file
fopen: Permission denied
Run Code Online (Sandbox Code Playgroud)

suexec.log;

[2013-06-20 01:15:39]: uid: (500/user) gid: (500/user) cmd: php-fcgi-starter
[2013-06-20 01:16:30]: uid: (500/user) gid: (500/user) cmd: php-fcgi-starter
[2013-06-20 01:16:39]: uid: (500/user) gid: (500/user) cmd: php-fcgi-starter
[2013-06-20 01:18:07]: uid: (500/user) gid: (500/user) cmd: php-fcgi-starter
[2013-06-20 01:22:21]: uid: (500/user) gid: (500/user) cmd: php-fcgi-starter
Run Code Online (Sandbox Code Playgroud)

当我strace同时使用php和 时suexec,他们不会抱怨任何丢失的库或文件。日志说“无法打开日志文件”,但它显然登录到监狱内的错误日志文件中。这个设置有什么问题?什么可能触发此错误?

编辑 :

跟踪结果;

[pid  9912] rt_sigaction(SIGCHLD, {SIG_DFL, [], SA_RESTORER|SA_INTERRUPT, …
Run Code Online (Sandbox Code Playgroud)

chroot permissions php apache-httpd suexec

7
推荐指数
1
解决办法
1583
查看次数

如何在 RHEL6/CentOS/SL6 上的 Apache 中获得 TLSv1.2 支持?

我想在我的 Scientific Linux 6(RHEL6 重建)服务器上的 Apache 中获得 TLSv1.2 支持。

是否有一些半支持的途径来让这个工作?最好使用最少的自定义重建。现在我正在使用 mod_ssl 和 open_ssl,如 SL6 存储库中提供的那样。

编辑:一旦 TLSv1.2 支持可用,Apache 配置就会有据可查,并且不会太难。问题是 RHEL6 附带 OpenSSL 1.0.0,它只支持 TLS 到 1.0 或 1.1。

rhel openssl scientific-linux apache-httpd

7
推荐指数
1
解决办法
4万
查看次数

Apache - 从现有的 .crt 文件生成私钥

我有一些 apache 实例使用自制生成的证书顺利运行。现在我必须使用提供的证书,但我发送的只是一个 .crt 文件。试图将其复制到正确的目录中,但是当我尝试重新启动网络服务器时,它会记录:

SSL Library Error: 185073780 error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch
Run Code Online (Sandbox Code Playgroud)

我认为这是正确的,因为 .key 文件是我自己制作的。有没有办法从 .crt 生成正确的 .key 文件?

ssl apache-httpd

7
推荐指数
1
解决办法
7万
查看次数

mod_authnz_ldap 绑定为身份验证用户而不是匿名

我正在尝试尽可能接近单一凭证。我们有一个 Web 应用程序,它的可用身份验证机制集相当有限,但(幸运的是)允许管理员告诉它信任REMOTE_USERhttpd.

有没有办法将 mod_authnz_ldap 配置为使用请求用户的凭据进行身份验证,而不仅仅是在匿名绑定或共享凭据之间进行选择?

这是我目前拥有的:

    <Location />

       AuthzLDAPLogLevel debug
       AuthType Basic
       AuthBasicProvider ldap
       AuthName "Active Directory"
       AuthzLDAPAuthoritative off
       AuthLDAPBindDN CN=jad,DC=xxx,DC=com
       AuthLDAPBindPassword xxx
       AuthLDAPURL ldap://xxx.xxx.64.71/DC=xxx,DC=com?samaccountname?sub
       require valid-user

    </Location>
Run Code Online (Sandbox Code Playgroud)

xxx的标记修订。基本上上述工作可以验证用户,但它使用我的帐户绑定到 AD。如果我尝试注释掉AuthLDAPBindDN并且AuthLDAPBindPassword它似乎尝试执行匿名绑定,AD 管理员已将其配置为拒绝。

我的问题是是否可以将 apache 配置为使用身份验证用户的凭据,而不是让我在匿名绑定或使用共享帐户之间进行选择(鉴于 AD 人员设置的策略,这也是不可能的)。使用一个人的帐户显然也不适用于他们被终止或离开的情况。

ldap authentication apache-httpd

7
推荐指数
1
解决办法
7826
查看次数

停止服务后Apache服务器自动启动

什么会导致httpd停止后自动启动?

在 bash 脚本中,我需要先停止 apache Web 服务器。这是脚本:

apachectl stop;
while pgrep httpd; do sleep 1; done
echo "[Apache server stopped]"
Run Code Online (Sandbox Code Playgroud)

当我运行脚本时,它会打印正在运行的 apache 进程,直到没有任何正在运行的进程并打印[Apache 服务器停止]

然后运行该命令pgrep httpd不会打印任何内容,但是如果我进入服务器托管的网站,则会pgrep httpd打印一些 httpd 进程。

这是停止 apache 的正确方法吗?为什么运行后会自动启动apachectl stop?如果它与KeepAliveTime相关,我如何强制正在运行的子进程停止?

编辑:这对于在命令行中运行service httpd stopapachectl stop命令也是如此。

centos apache-httpd

7
推荐指数
1
解决办法
7781
查看次数

如何检查 mod_ssl.so 版本?

我正在运行Apache 2.2.3并想了解如何检查版本mod_ssl.so以及此模块是否可以支持TLSv1.1TLSv1.2.

ssl apache-httpd

6
推荐指数
2
解决办法
2万
查看次数

为什么我在 /etc/apache2 中没有 httpd.conf 文件?

我安装了 Ubuntu 14.04 LTS。Ubuntu 似乎带有 Apache2,但在apache2文件夹中没有httpd.conf?

为什么缺少文件,我该怎么做才能创建它?

ubuntu apache-httpd

6
推荐指数
1
解决办法
3万
查看次数

如何使用 YUM 在 CentOS 6 中安装旧版本的 Apache httpd

如何在 CentOS 6 机器上安装旧版本的 Apache httpd?当我做:

sudo yum --showduplicates list httpd | expand
Run Code Online (Sandbox Code Playgroud)

我得到:

file:///media/project/repodata/repomd.xml: [Errno 14] Could not open/read file:///media/project/repodata/repomd.xml
Trying other mirror.
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: pubmirrors.dal.corespace.com
 * extras: pubmirrors.dal.corespace.com
 * updates: repos.dfw.quadranet.com
Available Packages
httpd.x86_64                   2.2.15-45.el6.centos                      base
httpd.x86_64                   2.2.15-47.el6.centos                      updates
httpd.x86_64                   2.2.15-47.el6.centos.1                    updates
Run Code Online (Sandbox Code Playgroud)

Apache 的当前稳定版本是 2.4.18,我需要安装旧版本的 Apache,准确地说是 2.2.26。我看到的可用版本是 2.2.15。我是否必须在我的机器上添加另一个 YUM 存储库?

当我尝试做:

sudo yum install httpd-2.2.26
Run Code Online (Sandbox Code Playgroud)

我收到一条消息,说明:

没有可用的包 httpd-2.2.26

我想另一个选择是尝试从源代码在我的机器上构建它。

yum centos apache-httpd

6
推荐指数
1
解决办法
2万
查看次数

httpd (apache2) 服务器不解析 *.php 文件,而是将它们显示为安装了 php 模块的文本

我正在尝试在 archlinux 上设置我的 httpd (apache2) 服务器。现在一切正常,除了解析我的 php 文件。

我关注了这篇文章:https : //wiki.archlinux.org/index.php/Apache_HTTP_Server#PHP

我已经

  • 安装的 php 和 php-apache 包
  • 配置 apache 使用 prefork-module 而不是 event-module
  • 启用 php_7 模块
  • 包括额外的/php7_module.conf
  • 像在我的 Ubuntu 上一样设置一个 cgi-script-handler。

这是我的 httpd.conf:

#
# This is the main Apache HTTP server configuration file.  It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/2.4/> for detailed information.
# In particular, see 
# <URL:http://httpd.apache.org/docs/2.4/mod/directives.html>
# for a discussion of each configuration directive.
#
# …
Run Code Online (Sandbox Code Playgroud)

arch-linux php apache-httpd php7

6
推荐指数
1
解决办法
2万
查看次数