From 819144c512ae330045faa1c9fa2c9e4ec351dcd8 Mon Sep 17 00:00:00 2001 From: "Adam T. Carpenter" Date: Mon, 9 Jan 2023 23:00:54 -0500 Subject: feat: add basic auth for some no-crawler pages --- usr/local/etc/lighttpd/conf.d/auth.conf | 4 ++++ usr/local/etc/lighttpd/lighttpd.conf | 1 + 2 files changed, 5 insertions(+) create mode 100644 usr/local/etc/lighttpd/conf.d/auth.conf (limited to 'usr') diff --git a/usr/local/etc/lighttpd/conf.d/auth.conf b/usr/local/etc/lighttpd/conf.d/auth.conf new file mode 100644 index 0000000..a3e1edc --- /dev/null +++ b/usr/local/etc/lighttpd/conf.d/auth.conf @@ -0,0 +1,4 @@ +server.modules += ("mod_auth", "mod_authn_file") +auth.backend = "htpasswd" +auth.backend.htpasswd.userfile = "/var/carpentertutoring/tutors.htpasswd" +auth.require = ( "/tutors" => ("method" => "basic", "realm" => "Tutors", "require" => "valid-user") ) diff --git a/usr/local/etc/lighttpd/lighttpd.conf b/usr/local/etc/lighttpd/lighttpd.conf index 0746ae6..c5a9cb0 100644 --- a/usr/local/etc/lighttpd/lighttpd.conf +++ b/usr/local/etc/lighttpd/lighttpd.conf @@ -1,6 +1,7 @@ var.log_root = "/var/log/lighttpd" include "conf.d/access_log.conf" include "conf.d/mime.conf" +include "conf.d/auth.conf" include "conf.d/cgi.conf" index-file.names += ("index.php") server.breakagelog = log_root + "/breakage.log" -- cgit v1.2.3