summaryrefslogtreecommitdiff
path: root/usr
diff options
context:
space:
mode:
authorAdam T. Carpenter <atc@53hor.net>2023-01-09 23:00:54 -0500
committerAdam T. Carpenter <atc@53hor.net>2023-01-09 23:00:54 -0500
commit819144c512ae330045faa1c9fa2c9e4ec351dcd8 (patch)
tree61d65c66ece6ac330a964c129401ee8a83d3bfe1 /usr
parent9509697ae2f3ca0eafe383d722cccfda8e667b87 (diff)
downloadcarpentertutoring-819144c512ae330045faa1c9fa2c9e4ec351dcd8.tar.xz
carpentertutoring-819144c512ae330045faa1c9fa2c9e4ec351dcd8.zip
feat: add basic auth for some no-crawler pagesHEADmaster
Diffstat (limited to 'usr')
-rw-r--r--usr/local/etc/lighttpd/conf.d/auth.conf4
-rw-r--r--usr/local/etc/lighttpd/lighttpd.conf1
2 files changed, 5 insertions, 0 deletions
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"