【问题标题】:mod_ssl not compiling with apache2mod_ssl 没有用 apache2 编译
【发布时间】:2011-06-29 10:21:38
【问题描述】:

已解决

已解决,但这是一个奇怪的问题。我按照 Capsule 的建议检查了 config.log,发现以下行:

configure:14368: checking whether to enable mod_ssl
configure:16123: result: no

当我明确要求它时,我想知道为什么它没有安装 ssl。然后我找到了它解析过的配置命令:

./configure --prefix=/usr/local/apache --enable-so--enable-cgi--enable-info--enable-rewrite--enable-speling--enable-usertrack--enable-deflate --enable-ssl--enable-mime-magic

注意到缺少空格了吗?我已经在新行中输入了带有每个指令的命令,所以它缺少空格,并且没有正确传递参数。

现在它按预期工作了!


Apache 构建(2.2.1):

./configure --prefix=/usr/local/apache \
    --enable-so \
    --enable-cgi    \
    --enable-info   \
    --enable-rewrite    \
    --enable-speling    \
    --enable-usertrack  \
    --enable-deflate \
    --enable-ssl    \
    --enable-mime-magic

当我尝试配置 ssl 时,我在尝试重新启动 apache 时得到以下信息

Syntax error on line 56 of /usr/local/apache/conf/extra/httpd-ssl.conf:
Invalid command 'SSLPassPhraseDialog', perhaps misspelled or defined by a module not included in the server configuration

这是已编译模块的列表(缺少 SSL)

/usr/local/apache/bin/apachectl -M
Loaded Modules:
 core_module (static)
 authn_file_module (static)
 authn_default_module (static)
 authz_host_module (static)
 authz_groupfile_module (static)
 authz_user_module (static)
 authz_default_module (static)
 auth_basic_module (static)
 include_module (static)
 filter_module (static)
 log_config_module (static)
 env_module (static)
 setenvif_module (static)
 version_module (static)
 mpm_prefork_module (static)
 http_module (static)
 mime_module (static)
 status_module (static)
 autoindex_module (static)
 asis_module (static)
 cgi_module (static)
 negotiation_module (static)
 dir_module (static)
 actions_module (static)
 userdir_module (static)
 alias_module (static)
 so_module (static)
 php5_module (shared)

【问题讨论】:

  • 感谢您的解释!您是如何在多行中键入命令的?知道为什么它错过了大部分空间会很有趣。
  • 就像我发布的一样,我将其从文件复制粘贴到服务器,然后复制到此处。
  • 嗯,这真的很奇怪。我可以理解几个空格搞砸了,但是在“--enable-so”之后你只有一个,然后它就消失了。我猜你的 shell 或 ssh 客户端不喜欢粘贴操作 ;-)

标签: apache ssl mod-ssl


【解决方案1】:

检查 ./configure 在检查 openssl 库时是否没有对缺少的内容大喊大叫。它可能没有正确编译,因此未列出该模块。

你也可以看看 config.log

【讨论】:

    猜你喜欢
    • 2014-11-16
    • 2018-05-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-03-24
    • 2021-11-18
    • 1970-01-01
    相关资源
    最近更新 更多