mirror of
https://codeberg.org/angestoepselt/homepage.git
synced 2026-03-21 22:32:17 +00:00
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
66 lines
2.3 KiB
ApacheConf
66 lines
2.3 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'; script-src 'self' 'unsafe-inline' https://hcaptcha.com https://*.hcaptcha.com; 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; frame-ancestors 'none'",
|
|
)
|
|
|
|
url.redirect = (
|
|
# These are redirects from the old site - keep them so we don't hurt any
|
|
# search engine indexes!
|
|
"^/unser-verein($|/)" => "/ueber-uns",
|
|
"^/mitglied-werden($|/)" => "/mitmachen",
|
|
"^/geld-spenden($|/)" => "/spenden",
|
|
"^/sonstige-unterstuetzung($|/)" => "/spenden",
|
|
"^/computerspende($|/)" => "/#computerspende",
|
|
"^/computer-spenden($|/)" => "/hardware-spenden",
|
|
"^/kooperation($|/)" => "/ueber-uns/partner",
|
|
"^/satzung($|/)" => "/ueber-uns/satzung",
|
|
"^/presse($|/)" => "/neuigkeiten/pressestimmen",
|
|
)
|
|
|
|
#
|
|
# CGI / form handling
|
|
#
|
|
|
|
$HTTP["request-method"] =~ "GET|POST" {
|
|
url.rewrite = (
|
|
"^/kontakt" => "/cgi-bin/form.py",
|
|
"^/kontakt/problem" => "/cgi-bin/form.py",
|
|
"^/spenden" => "/cgi-bin/form.py",
|
|
"^/mitmachen" => "/cgi-bin/form.py",
|
|
"^/computer-beantragen/organisation" => "/cgi-bin/form.py",
|
|
"^/computer-beantragen/privat" => "/cgi-bin/form.py",
|
|
"^/hardware-spenden/organisation" => "/cgi-bin/form.py",
|
|
# Note the actual POST endpoint is /hardware-spenden/privat/laptop, but the
|
|
# form is served from /hardware-spenden/privat.
|
|
"^/hardware-spenden/privat" => "/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,
|
|
)
|
|
}
|