summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TODO.org8
-rw-r--r--bin/lowercase.cgi8
-rw-r--r--nginx.conf.example6
-rw-r--r--uwsgi.ini.example9
4 files changed, 25 insertions, 6 deletions
diff --git a/TODO.org b/TODO.org
index bad2593..1fe8e3a 100644
--- a/TODO.org
+++ b/TODO.org
@@ -1,6 +1,2 @@
-* functionality
-- tag filtering
-* style
-- org tables
-* wish
-- case insenstive URLs
+- documentation
+- org tables (style)
diff --git a/bin/lowercase.cgi b/bin/lowercase.cgi
new file mode 100644
index 0000000..376ad54
--- /dev/null
+++ b/bin/lowercase.cgi
@@ -0,0 +1,8 @@
+#!/usr/bin/env bash
+uri="${REQUEST_SCHEME:-http}://${HTTP_HOST}${PATH_INFO}"
+if test -n "$QUERY_STRING"; then
+ uri+="?$QUERY_STRING"
+fi
+printf '%s\r\n' \
+ "Location: $uri" \
+ ''
diff --git a/nginx.conf.example b/nginx.conf.example
index 734c7cd..403c66e 100644
--- a/nginx.conf.example
+++ b/nginx.conf.example
@@ -9,6 +9,12 @@ server {
rewrite ^(.*[^/])$ $1/ permanent;
}
+ location ~ [A-Z] {
+ uwsgi_pass unix:/run/uwsgi/www.sock;
+ uwsgi_modifier1 9; # Standard CGI request
+ include uwsgi_params;
+ }
+
location / {
try_files /out$uri/index.html /out$uri /src$uri =404;
}
diff --git a/uwsgi.ini.example b/uwsgi.ini.example
new file mode 100644
index 0000000..e392044
--- /dev/null
+++ b/uwsgi.ini.example
@@ -0,0 +1,9 @@
+[uwsgi]
+master = true
+processes = 1
+
+uid = nobody
+gid = http
+
+plugins = cgi
+cgi = /srv/http/www.andrewdm.me/bin/lowercase.cgi