Skip to content

Commit

Permalink
lighttpd: list server.modules where modules used
Browse files Browse the repository at this point in the history
list server.modules where modules are used

lighttpd 1.4.56 and later ignore duplicates in server.modules, so
uncomment those lines so that the modules are guaranteed to be loaded
by the lighttpd config
  • Loading branch information
gstrauss committed Nov 6, 2024
1 parent 263b436 commit a8732d5
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/templates/partials/lighttpd.hbs
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
# {{output.header}}
# {{{output.link}}}
#server.modules += ("mod_redirect")
#server.modules += ("mod_setenv")
#server.modules += ("mod_openssl")
#server.port = 80
$SERVER["socket"] == "[::]:80" { }

{{#if (minver "1.4.56" form.serverVersion)}}
# select one TLS module: "mod_openssl" "mod_mbedtls" "mod_gnutls" "mod_wolfssl" "mod_nss"
#server.modules += ("mod_openssl")
server.modules += ("mod_openssl")

# lighttpd 1.4.56 and later will inherit ssl.* from the global scope if
# $SERVER["socket"] contains ssl.engine = "enable" and no other ssl.* options
Expand Down Expand Up @@ -74,6 +71,9 @@ ssl.cipher-list = "{{{join output.ciphers ":"}}}"
{{/if}}
{{/if}}
{{else}}
{{#if (minver "1.4.46" form.serverVersion)}}
#server.modules += ("mod_openssl")
{{/if}}
$SERVER["socket"] == ":443" {
ssl.engine = "enable"

Expand Down Expand Up @@ -117,6 +117,13 @@ $SERVER["socket"] == ":443" {
{{/if}}

{{#if form.hsts}}
{{#if (minver "1.4.56" form.serverVersion)}}
server.modules += ("mod_redirect")
server.modules += ("mod_setenv")
{{else}}
#server.modules += ("mod_redirect")
#server.modules += ("mod_setenv")
{{/if}}
$HTTP["scheme"] == "https" {
# HTTP Strict Transport Security ({{output.hstsMaxAge}} seconds)
setenv.add-response-header = (
Expand Down

0 comments on commit a8732d5

Please sign in to comment.