homepage/sites/coderdojo/httpd.conf
Yannik Rödel ac70140fad Fix error related to lighttpd MIME type handling
lighttpd wouldn't start, erroring with something like

    (../src/configfile.c.2449) include file not found:
/etc/lighttpd/mime-types.conf
    (../src/configfile.c.2256) source: /httpd.conf line: 10 pos: 0
parser failed somehow near here: (EOL)

This is because the alpine packaging for lighttpd has moved away from
including this file in the default setup [1]. It doesn't seem to be
needed anymore, so it can probably go.

[1]:
632d675ea8
2025-06-15 17:49:46 +02:00

44 lines
1.5 KiB
ApacheConf

server.modules += ( "mod_accesslog", "mod_alias", "mod_cgi", "mod_redirect", "mod_rewrite", "mod_setenv" )
server.port = 80
# See here: https://redmine.lighttpd.net/boards/2/topics/8382
accesslog.filename = "/dev/fd/3"
server.document-root = "@site@"
index-file.names = ( "index.html" )
setenv.set-response-header += (
"Content-Security-Policy" => "default-src 'self'; img-src 'self' data: https://photos.gutwe.in; script-src 'self' 'eval' 'unsafe-inline' https://hcaptcha.com https://*.hcaptcha.com https://bot.coderdojo-wue.de; frame-src 'self' https://hcaptcha.com https://*.hcaptcha.com; style-src 'self' 'unsafe-inline' https://hcaptcha.com https://*.hcaptcha.com; connect-src 'self' https://hcaptcha.com https://*.hcaptcha.com https://bot.coderdojo-wue.de; frame-ancestors 'none'",
)
#
# CGI / form handling
#
$HTTP["request-method"] =~ "GET|POST" {
url.rewrite = (
"^/anmelden" => "/cgi-bin/form.py",
"^/freizeit" => "/cgi-bin/form.py",
)
}
$HTTP["url"] =~ "^/cgi-bin/" {
alias.url += ( "/cgi-bin" => "@cgibin@" )
static-file.exclude-extensions = ( ".py" )
cgi.assign = ( ".py" => "@python@" )
cgi.execute-x-only = "enable"
cgi.x-sendfile = "enable"
cgi.x-sendfile-docroot = ( "@site@" )
setenv.set-environment = (
"SITE_DIRECTORY" => "@site@",
"ZAMMAD_URL" => env.ZAMMAD_URL,
"ZAMMAD_TOKEN" => env.ZAMMAD_TOKEN,
"ZAMMAD_GROUP" => env.ZAMMAD_GROUP,
"HCAPTCHA_SITE_KEY" => env.HCAPTCHA_SITE_KEY,
"HCAPTCHA_SECRET_KEY" => env.HCAPTCHA_SECRET_KEY,
)
}