2

我花了几个小时试图将我的 Apache 服务器配置为使用没有公共 IP 的 SSL,只有 localhost。我已经创建了证书,我认为(这对我来说就像一个关于黑魔法的速成课程),当我尝试访问https://localhost时,浏览器在状态行,但只是永远加载。这是来自的片段error_log

[Fri Mar 27 22:03:39 2009] [info] Loading certificate & private key of SSL-aware server
[Fri Mar 27 22:03:39 2009] [info] Configuring server for SSL protocol
[Fri Mar 27 22:03:39 2009] [info] Loading certificate & private key of SSL-aware server
[Fri Mar 27 22:03:40 2009] [info] Configuring server for SSL protocol

那里一切似乎都还好,但与此同时,在ssl_engine_log...

[Fri Mar 27 22:03:39 2009] [info] Init: Initializing OpenSSL library
[Fri Mar 27 22:03:39 2009] [info] Init: Seeding PRNG with 136 bytes of entropy
[Fri Mar 27 22:03:39 2009] [info] Init: Generating temporary RSA private keys (512/1024 bits)
[Fri Mar 27 22:03:39 2009] [info] Init: Generating temporary DH parameters (512/1024 bits)
[Fri Mar 27 22:03:39 2009] [info] Init: Initializing (virtual) servers for SSL
[Fri Mar 27 22:03:39 2009] [info] mod_ssl/2.0.61 compiled against Server: Apache/2.0.61, Library: OpenSSL/0.9.7i
[Fri Mar 27 22:03:39 2009] [warn] module php5_module is already loaded, skipping
[Fri Mar 27 22:03:39 2009] [info] Init: Initializing OpenSSL library
[Fri Mar 27 22:03:39 2009] [info] Init: Seeding PRNG with 136 bytes of entropy[Fri Mar 27 22:03:39 2009] [info] Init: Generating temporary RSA private keys (512/1024 bits)
[Fri Mar 27 22:03:40 2009] [info] Init: Generating temporary DH parameters (512/1024 bits)
[Fri Mar 27 22:03:40 2009] [info] Init: Initializing (virtual) servers for SSL
[Fri Mar 27 22:03:40 2009] [info] mod_ssl/2.0.61 compiled against Server: Apache/2.0.61, Library: OpenSSL/0.9.7i
[Fri Mar 27 22:03:40 2009] [notice] Digest: generating secret for digest authentication ...
[Fri Mar 27 22:03:40 2009] [notice] Digest: done
[Fri Mar 27 22:03:40 2009] [notice] Apache/2.0.61 (Unix) mod_ssl/2.0.61 OpenSSL/0.9.7l DAV/2 PHP/5.2.5 configured -- resuming normal operations
[Fri Mar 27 22:03:40 2009] [info] Server built: Jan 17 2008 17:33:42
[Fri Mar 27 22:03:40 2009] [emerg] (13)Permission denied: apr_proc_mutex_lock failed. Attempting to shutdown process gracefully.
[Fri Mar 27 22:03:40 2009] [emerg] (13)Permission denied: apr_proc_mutex_lock failed. Attempting to shutdown process gracefully.

...更像最后两行,直到我最终停止服务器...

[Fri Mar 27 22:03:43 2009] [info] removed PID file /usr/local/apache2/logs/httpd.pid (pid=8786)
[Fri Mar 27 22:03:43 2009] [notice] caught SIGTERM, shutting down

一些关于这个permission denied的谷歌搜索和apr_proc_mutex_lock失败并没有产生任何有用的东西。只有一些与 MPM 和 perchild 选项相关的结果,但由于它们很旧(2002 年和 2003 年)而且我在阅读它们后真的不能得出任何结论,我问你是否有办法克服这个问题。好吧,首先:实际上是什么问题?模块之间是否存在某种不兼容?我是否必须重新编译某些东西(请主,不要再编译了,不)?

提前致谢。

4

1 回答 1

4

只是感谢您没有使用 apache 1.3——在其上运行 SSL 要困难得多!

mod_ssl 需要几个文件的写权限才能工作。查看此设置并确保 apache 具有对该文件所在目录的写入权限。例如,如果说(例如):

SSLMutex file:/var/run/apache/ssl.mutex

您需要验证 apache 是否可以写入/var/run/apache.

几乎所有这些类型的错误通常都是文件系统上的某种权限错误。

于 2009-03-29T01:59:44.280 回答