Project

General

Profile

[Solved] Failed to enable SSL with 1.4.35

Added by Tom almost 7 years ago

I am trying to enable a simple SSL with 1.4.35, but can't get it to work. The normal http on port 80 works, but it will fail to run when I add SSL configuration. Any help will be appreciated. Thanks.

$ lighttpd -v
lighttpd/1.4.35 (ssl) - a light and fast webserver
Build-Date: Apr 18 2016 15:36:10

Without SSL
$ netstat -ant | grep LISTEN
tcp 0 0 10.66.3.25:80 0.0.0.0:* LISTEN

Here is the lighttp.conf:
-------------------------------------------------------------
server.modules = (
"mod_access",
"mod_alias",
"mod_compress",
"mod_redirect",
)

server.document-root = "/var/www/html"
server.upload-dirs = ( "/var/cache/lighttpd/uploads" )
server.errorlog = "/var/log/lighttpd/error.log"
server.pid-file = "/var/run/lighttpd.pid"
server.username = "www-data"
server.groupname = "www-data"
server.port = 80
server.bind = "10.66.3.25"

$SERVER["socket"] == "10.66.3.25:443" {
ssl.engine = "enable"
ssl.pemfile = "/etc/lighttpd/certs/light.pem"
}

index-file.names = ( "index.php", "index.html", "index.lighttpd.html" )
url.access-deny = ( "~", ".inc" )
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
compress.cache-dir = "/var/cache/lighttpd/compress/"
compress.filetype = ( "application/javascript", "text/css", "text/html", "text/plain" )
include_shell "/usr/share/lighttpd/create-mime.assign.pl"
include_shell "/usr/share/lighttpd/include-conf-enabled.pl"


When I restart the process, the lighttpd will stop.
$ systemctl restart lighttpd.service
$ netstat -ant | grep LISTEN | grep 10.66.3.25

$ tail /var/log/lighttpd/error.log
2017-05-28 23:43:47: (log.c.164) server started
2017-05-28 23:52:13: (server.c.1558) server stopped by UID = 0 PID = 1


Replies (2)

RE: Failed to enable SSL with 1.4.35 - Added by gstrauss almost 7 years ago

There is likely a configuration error (such as a file permission error)

Run: lighttpd -f /etc/lighttpd/lighttpd.conf -t
and see what error gets written to the console.

[SOLVED]RE: [Answered] Failed to enable SSL with 1.4.35 - Added by Tom almost 7 years ago

Thanks for your reply.

I found out the issue is the cert/key file that lighttpd doesn't like. Resolved the issue by creating a new one.

    (1-2/2)