aboutsummaryrefslogtreecommitdiff
path: root/captain/bin
diff options
context:
space:
mode:
authorJeffrey Armstrong <jeff@approximatrix.com>2021-05-06 10:17:03 -0400
committerJeffrey Armstrong <jeff@approximatrix.com>2021-05-06 10:17:03 -0400
commit8ca6d21882c521fb78f1325e9a88a558364b3ad4 (patch)
treec11030395ad1643f436213d0e6d511d2fd0a1131 /captain/bin
parent58575b7eb5bbce3b253d55f122ab4f401d49eeba (diff)
downloadlevitating-8ca6d21882c521fb78f1325e9a88a558364b3ad4.tar.gz
levitating-8ca6d21882c521fb78f1325e9a88a558364b3ad4.zip
CGI interface at least starts properly. Fixed rendering of templates to actually take place in CGI mode.
Diffstat (limited to 'captain/bin')
-rw-r--r--captain/bin/local.conf50
-rwxr-xr-xcaptain/bin/startlight.sh7
2 files changed, 57 insertions, 0 deletions
diff --git a/captain/bin/local.conf b/captain/bin/local.conf
new file mode 100644
index 0000000..9c4b6a9
--- /dev/null
+++ b/captain/bin/local.conf
@@ -0,0 +1,50 @@
+server.bind = "0.0.0.0"
+server.port = 8000
+server.document-root = var.CWD + "/.."
+
+#"/home/jeff/Workspace/muffdive/pages"
+
+index-file.names = ( "index.php", "index.html", "index.htm", "default.htm" )
+
+server.modules = ( "mod_cgi", "mod_access", "mod_accesslog", "mod_alias", "mod_setenv" )
+
+setenv.add-environment = ( "LEVITATING_CONFIG_CGI" => env.LEVITATING_CONFIG_CGI )
+
+cgi.assign = ( ".html" => server.document-root + "/levitating-captain" )
+
+$HTTP["url"] =~ "^/cgi-bin" {
+ alias.url += ( "/cgi-bin" => server.document-root )
+ cgi.assign = ( "" => "" )
+}
+
+$HTTP["url"] =~ "^/static" {
+ alias.url += ( "/static" => server.document-root + "/example/static" )
+}
+
+$HTTP["url"] =~ "^/json" {
+ cgi.assign = ( ".json" => server.document-root + "/levitating-captain" )
+}
+
+mimetype.assign = (
+ ".css" => "text/css",
+ ".gif" => "image/gif",
+ ".htm" => "text/html",
+ ".html" => "text/html",
+ ".jpeg" => "image/jpeg",
+ ".jpg" => "image/jpeg",
+ ".js" => "text/javascript",
+ ".png" => "image/png",
+ ".swf" => "application/x-shockwave-flash",
+ ".txt" => "text/plain"
+)
+
+# Making sure file uploads above 64k always work when using IE or Safari
+# For more information, see http://trac.lighttpd.net/trac/ticket/360
+$HTTP["useragent"] =~ "^(.*MSIE.*)|(.*AppleWebKit.*)$" {
+ server.max-keep-alive-requests = 0
+}
+
+
+
+server.errorlog = server.document-root + "/example/log/error.log"
+accesslog.filename = server.document-root + "/example/log/access.log"
diff --git a/captain/bin/startlight.sh b/captain/bin/startlight.sh
new file mode 100755
index 0000000..7ec35c6
--- /dev/null
+++ b/captain/bin/startlight.sh
@@ -0,0 +1,7 @@
+#!/usr/bin/env bash
+
+export LEVITATING_CONFIG_CGI=$PWD/../example/levitating.conf
+echo Using $LEVITATING_CONFIG_CGI for configuration
+
+echo Starting up in $PWD
+lighttpd -D -f local.conf