lighttpd 缺少 mod_ssl.so

lighttpd 缺少 mod_ssl.so

我正在尝试为运行 Debian 8(Jessie)的 lighttpd 网络服务器设置 ssl(即 https)。

lighttpd.conf 中的相关行是:

server.modules = (
    "mod_access",
    "mod_alias",
    "mod_compress",
    "mod_redirect",
    "mod_ssi",
    "mod_fastcgi",
    "mod_auth",
    "mod_rewrite",
    "mod_proxy",
    "mod_ssl",
 )

 $SERVER["socket"] =~ "111.11.22.33:443" {
              server.document-root = "/var/www/html"
              ssl.engine = "enable"
              ssl.pemfile = "/etc/lighttpd/ssl/mydomain.com/mydomain.com.pem"
              }

该文件mydomain.com.pem已自行发布并到位。

然后我启动服务并检查是否一切正常:

# /etc/init.d/lighttpd restart
[ ok ] Restarting lighttpd (via systemctl): lighttpd.service.
# systemctl status lighttpd.service
●  lighttpd.service - Lighttpd Daemon
Loaded: loaded (/lib/systemd/system/lighttpd.service; enabled)
Active: failed (Result: exit-code) since Mi 2015-09-02 19:55:57 CEST; 5s ago
Process: 31750 ExecStart=/usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf (code=exited, status=255)
Process: 31742 ExecStartPre=/usr/sbin/lighttpd -t -f /etc/lighttpd/lighttpd.conf (code=exited, status=0/SUCCESS)
Main PID: 31750 (code=exited, status=255)

Sep 02 19:55:57 hostname.com lighttpd[31742]: Syntax OK
Sep 02 19:55:57 hostname.com lighttpd[31750]: 2015-09-02 19:55:57: (plugin.c.169) dlopen() failed for: /usr/lib/lighttpd/mod_ssl.so /usr/lib/lighttpd/mod_ssl.so: cannot open shared object file: No such file or directory
Sep 02 19:55:57 hostname.com lighttpd[31750]: 2015-09-02 19:55:57: (server.c.679) loading plugins finally failed
Sep 02 19:55:57 hostname.com systemd[1]: lighttpd.service: main process exited, code=exited, status=255/n/a
Sep 02 19:55:57 hostname.com systemd[1]: Unit lighttpd.service entered failed state.

显然,它没有起作用:mod_ssl.so缺少了。

apache 目录中有一个同名的库,但它不起作用(我尝试设置符号链接):

...
... undefined symbol: ap_set_deprecated
...

我从哪里得到mod_ssl.so

编辑:

# openssl --version
openssl:Error: '--version' is an invalid command
....
# lighttpd -v
lighttpd/1.4.35 (ssl) - a light and fast webserver
Build-Date: Nov  2 2014 03:47:15

答案1

从模块列表中删除该行。

SSL 支持被编译到 lighttpd 中,并不是一个单独的模块。

如果您的版本在编译的输出中具有此支持,lighttpd -v则将包括(ssl)

[root@APPS /]# lighttpd -v
lighttpd/1.4.36 (ssl) - a light and fast webserver
Build-Date: Jul 27 2015 14:27:26
[root@APPS /]#

实际工作由必须安装的 OpenSSL 库完成。

相关内容