From 7080d95e88dcf0441b4ff7820173c6dcd4b551c0 Mon Sep 17 00:00:00 2001 From: nathan Date: Thu, 14 Aug 2025 22:39:17 -0600 Subject: Block fuckers from viewing data directory with 4get config example --- org/4get-guide.org | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'org/4get-guide.org') diff --git a/org/4get-guide.org b/org/4get-guide.org index 171bccd..c2144f2 100644 --- a/org/4get-guide.org +++ b/org/4get-guide.org @@ -37,7 +37,7 @@ If your reading this you likely already used lighttpd since there is no other reason you would pick lighttpd out of all the other web servers rofl. Well anyways here is a basic config for 4get to get you started. #+begin_src - server.modules += ("mod_rewrite", "mod_fastcgi") + server.modules += ("mod_rewrite", "mod_fastcgi", "mod_access") server.name = "" server.document-root = "/usr/local/www/" server.pid-file = "/var/run/lighttpd.pid" @@ -49,6 +49,9 @@ anyways here is a basic config for 4get to get you started. "broken-scriptfilename" => "enable" )) ) + $HTTP["url"] =~ "^/data" { + url.access-deny = ("") + } url.rewrite-once = ( "^(.*)/$" => "$1/" ) url.rewrite-if-not-file = ( "^([^?]*)(\?.*)?$" => "$1.php$2" ) #+end_src -- cgit v1.2.3