4

I am trying to set up ssl (i.e. https) for my lighttpd web server running Debian 8 (Jessie).

The relevant lines in lighttpd.conf are:

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"
              }

The file mydomain.com.pem is self issued and in place.

Then I start the service and check whether everything is OK:

# /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.

Obviously, it did not work: mod_ssl.so is missing.

There is a library with that name in an apache directory, which does not work (I tried setting a symbolic link):

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

Where do I get mod_ssl.so from ???

edit:

# 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
  • Delete the line with "mod_ssl" in it from lighttpd.conf.
    – Brian
    Sep 2, 2015 at 18:54

1 Answer 1

5

Delete that line from your modules list.

SSL support is compiled into lighttpd and is not a separate module.

If your version has this support compiled in the output of lighttpd -v will include (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 /]#

The actual work is done by the OpenSSL library which must also be installed.

2
  • both is the case. I will edit my question
    – steffen
    Sep 2, 2015 at 18:27
  • Changed the answer to explicitly state what needs to be done and not just lead towards it.
    – Brian
    Sep 2, 2015 at 18:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .