From b42e16cee761c186cf8ea7166502933b65328b5e Mon Sep 17 00:00:00 2001 From: 53hornet Date: Wed, 29 Dec 2021 18:40:34 -0500 Subject: feat: add bastillefile, lighttpd config, and cgit config --- Bastillefile | 12 ++++++++++++ usr/local/etc/cgitrc | 3 +++ usr/local/etc/lighttpd/conf.d/access_log.conf | 2 ++ usr/local/etc/lighttpd/conf.d/cgi.conf | 2 ++ usr/local/etc/lighttpd/lighttpd.conf | 12 ++++++++++++ 5 files changed, 31 insertions(+) create mode 100644 Bastillefile create mode 100644 usr/local/etc/cgitrc create mode 100644 usr/local/etc/lighttpd/conf.d/access_log.conf create mode 100644 usr/local/etc/lighttpd/conf.d/cgi.conf create mode 100644 usr/local/etc/lighttpd/lighttpd.conf diff --git a/Bastillefile b/Bastillefile new file mode 100644 index 0000000..527641a --- /dev/null +++ b/Bastillefile @@ -0,0 +1,12 @@ +# Simple cgit instance for my web site + +# Prerequisites +PKG lighttpd cgit +OVERLAY usr +CMD mkdir -p /var/git +FSTAB /zroot/git /var/git nullfs ro 0 0 + +# Start server +SYSRC lighttpd_enable=YES +SERVICE lighttpd restart + diff --git a/usr/local/etc/cgitrc b/usr/local/etc/cgitrc new file mode 100644 index 0000000..91db721 --- /dev/null +++ b/usr/local/etc/cgitrc @@ -0,0 +1,3 @@ +logo=https://www.53hor.net/assets/53hornet.svg +favicon=https://www.53hor.net/assets/53hornet.svg +scan-path=/var/git diff --git a/usr/local/etc/lighttpd/conf.d/access_log.conf b/usr/local/etc/lighttpd/conf.d/access_log.conf new file mode 100644 index 0000000..71586e9 --- /dev/null +++ b/usr/local/etc/lighttpd/conf.d/access_log.conf @@ -0,0 +1,2 @@ +server.modules += ( "mod_accesslog" ) +accesslog.filename = log_root + "/access.log" diff --git a/usr/local/etc/lighttpd/conf.d/cgi.conf b/usr/local/etc/lighttpd/conf.d/cgi.conf new file mode 100644 index 0000000..b1ad517 --- /dev/null +++ b/usr/local/etc/lighttpd/conf.d/cgi.conf @@ -0,0 +1,2 @@ +server.modules += ( "mod_cgi" ) +cgi.assign = ( ".cgi" => "" ) diff --git a/usr/local/etc/lighttpd/lighttpd.conf b/usr/local/etc/lighttpd/lighttpd.conf new file mode 100644 index 0000000..277ac25 --- /dev/null +++ b/usr/local/etc/lighttpd/lighttpd.conf @@ -0,0 +1,12 @@ +var.log_root = "/var/log/lighttpd" +include "conf.d/access_log.conf" +include "conf.d/mime.conf" +include "conf.d/cgi.conf" +index-file.names += ("cgit.cgi") +server.document-root = "/usr/local/www/cgit" +server.errorlog = log_root + "/error.log" +server.breakagelog = log_root + "/breakage.log" +server.network-backend = "sendfile" +server.port = 80 +server.username = "www" +server.groupname = "www" -- cgit v1.2.3