mirror of
https://codeberg.org/angestoepselt/homepage.git
synced 2025-05-24 14:46:16 +00:00
Add http.conf for CoderDojo site
This commit is contained in:
parent
a8d9def507
commit
314b668621
1 changed files with 45 additions and 0 deletions
45
sites/coderdojo/httpd.conf
Normal file
45
sites/coderdojo/httpd.conf
Normal file
|
|
@ -0,0 +1,45 @@
|
||||||
|
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"
|
||||||
|
|
||||||
|
include "@mimetypes@"
|
||||||
|
|
||||||
|
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' https://hcaptcha.com, https://*.hcaptcha.com; connect-src 'self' https://hcaptcha.com https://*.hcaptcha.com; frame-ancestors 'none'",
|
||||||
|
)
|
||||||
|
|
||||||
|
#
|
||||||
|
# CGI / form handling
|
||||||
|
#
|
||||||
|
|
||||||
|
$HTTP["request-method"] =~ "GET|POST" {
|
||||||
|
url.rewrite = (
|
||||||
|
"^/anmelden" => "/cgi-bin/form.py",
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
$HTTP["url"] =~ "^/cgi-bin/" {
|
||||||
|
alias.url += ( "/cgi-bin" => "@cgibin@" )
|
||||||
|
|
||||||
|
static-file.exclude-extensions = ( ".py" )
|
||||||
|
cgi.assign = ( ".py" => "@python@/bin/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,
|
||||||
|
)
|
||||||
|
}
|
||||||
Loading…
Add table
Reference in a new issue