Lighttpd
缺少用於 lighttpd 的 mod_ssl.so
我正在嘗試為執行 Debian 8 (Jessie) 的 lighttpd Web 伺服器設置 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
從您的模組列表中刪除該行。
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 庫完成,該庫也必須安裝。