From 25b6fc226dd86c5a42d577a52b44ceb3d3926507 Mon Sep 17 00:00:00 2001
From: Britney Fransen <brfransen@gmail.com>
Date: Thu, 12 Jan 2023 13:52:09 -0500
Subject: linhes-web: add lighttpd conf file

---
 linhes/linhes-web/PKGBUILD        | 10 ++++--
 linhes/linhes-web/linhes-web.conf | 68 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 75 insertions(+), 3 deletions(-)
 create mode 100644 linhes/linhes-web/linhes-web.conf

diff --git a/linhes/linhes-web/PKGBUILD b/linhes/linhes-web/PKGBUILD
index 7f1d43f..0bb2824 100644
--- a/linhes/linhes-web/PKGBUILD
+++ b/linhes/linhes-web/PKGBUILD
@@ -1,17 +1,21 @@
 pkgname=linhes-web
 pkgver=9.0.0
-pkgrel=2
+pkgrel=3
 conflicts=()
 pkgdesc="LinHES local website"
 depends=('lighttpd' 'php-cgi')
 makedepends=()
 arch=('x86_64')
 license=('GPL')
-source=(website.tar.gz)
-sha256sums=('6ff99589d225826d86bd1911aa0223f3c9668c02ff15e7bc607e52d90cca20ae')
+source=('linhes-web.conf' 'website.tar.gz')
+sha256sums=('e39ce02bde5eb3d359f1286b41751aa715961cf2b2d9a1243c7f01d20ed9c993'
+            '6ff99589d225826d86bd1911aa0223f3c9668c02ff15e7bc607e52d90cca20ae')
 
 package() {
     mkdir -p $pkgdir/data/srv/httpd/htdocs/
     cp -rp $srcdir/website/contents/* $pkgdir/data/srv/httpd/htdocs
     chmod -R 755 $pkgdir/data/srv/httpd/htdocs
+
+    #lighttpd files
+    install -Dm644 $srcdir/linhes-web.conf $pkgdir/etc/lighttpd/conf.d/linhes-web.conf
 }
diff --git a/linhes/linhes-web/linhes-web.conf b/linhes/linhes-web/linhes-web.conf
new file mode 100644
index 0000000..aeac16b
--- /dev/null
+++ b/linhes/linhes-web/linhes-web.conf
@@ -0,0 +1,68 @@
+#server.errorlog-use-syslog      = "enable"
+#$HTTP["url"] !~ "\.(jpe?g|png|gif|css)" { accesslog.use-syslog = "enable" }
+
+$HTTP["url"] =~ "(mythweb)" {
+server.error-handler-404   = "/error/mythweb.html"
+}
+
+$HTTP["url"] =~ "(phpMyAdmin)" {
+server.error-handler-404   = "/error/phpadmin.html"
+}
+
+$HTTP["url"] =~ "(xymon)" {
+server.error-handler-404   = "/error/hobbit.html"
+}
+
+$HTTP["url"] =~ "(mythexport)" {
+server.error-handler-404   = "/error/mythexport.html"
+}
+
+$HTTP["url"] =~ "(call_log)" {
+server.error-handler-404   = "/error/call_log.html"
+}
+
+$HTTP["url"] =~ "(mythexpress)" {
+    server.error-handler-404   = "/error/mythexpress.html"
+}
+
+$HTTP["url"] =~ "(remyth)" {
+    server.error-handler-404   = "/error/remyth.html"
+}
+
+
+$HTTP["url"] =~ "(zm)" {
+    server.error-handler-404   = "/error/zoneminder.html"
+    }
+
+## error-handler for status 404
+#server.error-handler-404   = "/error-handler.html"
+server.errorfile-prefix = "/data/srv/httpd/htdocs/error/status-"
+
+
+alias.url += ( "/logs/" => "/var/log/" )
+$HTTP["url"] =~ "^/logs($|/)" {
+    dir-listing.activate= "enable"
+    dir-listing.hide-dotfiles = "enable"
+    dir-listing.external-css = "/frame.css"
+}
+
+
+
+#cgi.assign                 = ( ".pl"  => "/usr/bin/perl",
+#                                ".sh" => "/bin/bash" ,
+#                                ".py" => "/usr/bin/python" ,
+#                               ".cgi" => "/bin/bash" )
+
+
+$SERVER["socket"] == ":1337" {
+  server.document-root = "/data/srv/httpd/cgi/"
+  alias.url = ( "/templates/" => "/home/mythtv/templates/" )
+
+}
+
+
+#### status module
+status.status-url          = "/server-status"
+status.config-url          = "/server-config"
+
+#ssi.extension              = ( ".shtml" )
-- 
cgit v0.12

