From 9e007eb7de831bb6e8542d7edab51c839533bda8 Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Mon, 8 Jul 2019 16:06:42 +0200 Subject: gitweb as docker service, initial commit --- lighttpd.conf | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 lighttpd.conf (limited to 'lighttpd.conf') diff --git a/lighttpd.conf b/lighttpd.conf new file mode 100644 index 0000000..3d546dc --- /dev/null +++ b/lighttpd.conf @@ -0,0 +1,45 @@ +server.modules = ( + "mod_rewrite", + "mod_alias", + "mod_access", + "mod_setenv", + "mod_cgi", + "mod_accesslog" +) + +include "mime-types.conf" + +server.username = "lighttpd" +server.groupname = "lighttpd" +server.pid-file = "/run/lighttpd.pid" +server.document-root = "/usr/share/gitweb/" +static-file.exclude-extensions = ( ".cgi" ) + +$HTTP["url"] !~ "^/static" { # gitweb assets (js, css, png) + + dir-listing.activate = "disable" + cgi.assign = ( ".cgi" => "" ) + $HTTP["url"] =~ "^/.*/(HEAD|info/refs|objects/info/|git-(upload|receive)-pack)" { # git over http + cgi.assign = ("" => "") + alias.url += ( "/" => "/usr/libexec/git-core/git-http-backend/" ) + setenv.add-environment = ( + "GIT_PROJECT_ROOT" => "/var/git", + "GIT_HTTP_EXPORT_ALL" => "" + ) + } + else $HTTP["url"] =~ "^/(?!gitweb.cgi)" { # gitweb + server.indexfiles = ( "gitweb.cgi" ) + alias.url += ( "/" => "/usr/share/gitweb/" ) + url.rewrite-once = ( "^/(.*)" => "/gitweb.cgi/$1" ) + } +} + +setenv.add-environment = ( + "GITWEB_CONFIG" => "/etc/gitweb.conf", + "PATH" => env.PATH +) + +#debug.log-request-header = "enable" +#debug.log-response-header = "enable" +#debug.log-request-handling = "enable" +#debug.log-file-not-found = "enable" -- cgit v1.2.3