summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/s6-rc/httpd-4-log/consumer-for1
-rw-r--r--examples/s6-rc/httpd-4-log/notification-fd1
-rw-r--r--examples/s6-rc/httpd-4-log/pipeline-name1
-rwxr-xr-xexamples/s6-rc/httpd-4-log/run5
-rw-r--r--examples/s6-rc/httpd-4-log/type1
-rw-r--r--examples/s6-rc/httpd-4/notification-fd1
-rw-r--r--examples/s6-rc/httpd-4/producer-for1
-rwxr-xr-xexamples/s6-rc/httpd-4/run10
-rw-r--r--examples/s6-rc/httpd-4/type1
-rw-r--r--examples/s6-rc/httpd-6-log/consumer-for1
-rw-r--r--examples/s6-rc/httpd-6-log/notification-fd1
-rw-r--r--examples/s6-rc/httpd-6-log/pipeline-name1
-rwxr-xr-xexamples/s6-rc/httpd-6-log/run5
-rw-r--r--examples/s6-rc/httpd-6-log/type1
-rw-r--r--examples/s6-rc/httpd-6/notification-fd1
-rw-r--r--examples/s6-rc/httpd-6/producer-for1
-rwxr-xr-xexamples/s6-rc/httpd-6/run10
-rw-r--r--examples/s6-rc/httpd-6/type1
-rw-r--r--examples/s6-rc/httpsd-4-log/consumer-for1
-rw-r--r--examples/s6-rc/httpsd-4-log/notification-fd1
-rw-r--r--examples/s6-rc/httpsd-4-log/pipeline-name1
-rwxr-xr-xexamples/s6-rc/httpsd-4-log/run5
-rw-r--r--examples/s6-rc/httpsd-4-log/type1
-rw-r--r--examples/s6-rc/httpsd-4/notification-fd1
-rw-r--r--examples/s6-rc/httpsd-4/producer-for1
-rwxr-xr-xexamples/s6-rc/httpsd-4/run11
-rw-r--r--examples/s6-rc/httpsd-4/type1
-rw-r--r--examples/s6-rc/httpsd-6-log/consumer-for1
-rw-r--r--examples/s6-rc/httpsd-6-log/notification-fd1
-rw-r--r--examples/s6-rc/httpsd-6-log/pipeline-name1
-rwxr-xr-xexamples/s6-rc/httpsd-6-log/run5
-rw-r--r--examples/s6-rc/httpsd-6-log/type1
-rw-r--r--examples/s6-rc/httpsd-6/notification-fd1
-rw-r--r--examples/s6-rc/httpsd-6/producer-for1
-rwxr-xr-xexamples/s6-rc/httpsd-6/run11
-rw-r--r--examples/s6-rc/httpsd-6/type1
-rw-r--r--examples/tipidee.conf41
37 files changed, 131 insertions, 0 deletions
diff --git a/examples/s6-rc/httpd-4-log/consumer-for b/examples/s6-rc/httpd-4-log/consumer-for
new file mode 100644
index 0000000..3dfc041
--- /dev/null
+++ b/examples/s6-rc/httpd-4-log/consumer-for
@@ -0,0 +1 @@
+httpd-4
diff --git a/examples/s6-rc/httpd-4-log/notification-fd b/examples/s6-rc/httpd-4-log/notification-fd
new file mode 100644
index 0000000..00750ed
--- /dev/null
+++ b/examples/s6-rc/httpd-4-log/notification-fd
@@ -0,0 +1 @@
+3
diff --git a/examples/s6-rc/httpd-4-log/pipeline-name b/examples/s6-rc/httpd-4-log/pipeline-name
new file mode 100644
index 0000000..291f119
--- /dev/null
+++ b/examples/s6-rc/httpd-4-log/pipeline-name
@@ -0,0 +1 @@
+httpd-4-pipeline
diff --git a/examples/s6-rc/httpd-4-log/run b/examples/s6-rc/httpd-4-log/run
new file mode 100755
index 0000000..51897c7
--- /dev/null
+++ b/examples/s6-rc/httpd-4-log/run
@@ -0,0 +1,5 @@
+#!/bin/execlineb -S1
+
+s6-setuidgid wwwlog
+exec -c
+s6-log -d3 t s1000000 n20 /var/log/httpd-4
diff --git a/examples/s6-rc/httpd-4-log/type b/examples/s6-rc/httpd-4-log/type
new file mode 100644
index 0000000..5883cff
--- /dev/null
+++ b/examples/s6-rc/httpd-4-log/type
@@ -0,0 +1 @@
+longrun
diff --git a/examples/s6-rc/httpd-4/notification-fd b/examples/s6-rc/httpd-4/notification-fd
new file mode 100644
index 0000000..00750ed
--- /dev/null
+++ b/examples/s6-rc/httpd-4/notification-fd
@@ -0,0 +1 @@
+3
diff --git a/examples/s6-rc/httpd-4/producer-for b/examples/s6-rc/httpd-4/producer-for
new file mode 100644
index 0000000..9835bc1
--- /dev/null
+++ b/examples/s6-rc/httpd-4/producer-for
@@ -0,0 +1 @@
+httpd-4-log
diff --git a/examples/s6-rc/httpd-4/run b/examples/s6-rc/httpd-4/run
new file mode 100755
index 0000000..190392f
--- /dev/null
+++ b/examples/s6-rc/httpd-4/run
@@ -0,0 +1,10 @@
+#!/bin/execlineb -P
+
+fdmove -c 2 1
+backtick -E ip { pipeline { s6-dnsip4 example.com } head -n 1 }
+s6-envuidgid www
+cd /home/www
+fdmove 1 3
+s6-tcpserver4 -v2 -1 -U -c 512 -- $ip 80
+s6-tcpserver-access -lexample.com --
+tipideed -v2 --
diff --git a/examples/s6-rc/httpd-4/type b/examples/s6-rc/httpd-4/type
new file mode 100644
index 0000000..5883cff
--- /dev/null
+++ b/examples/s6-rc/httpd-4/type
@@ -0,0 +1 @@
+longrun
diff --git a/examples/s6-rc/httpd-6-log/consumer-for b/examples/s6-rc/httpd-6-log/consumer-for
new file mode 100644
index 0000000..a8c09a3
--- /dev/null
+++ b/examples/s6-rc/httpd-6-log/consumer-for
@@ -0,0 +1 @@
+httpd-6
diff --git a/examples/s6-rc/httpd-6-log/notification-fd b/examples/s6-rc/httpd-6-log/notification-fd
new file mode 100644
index 0000000..00750ed
--- /dev/null
+++ b/examples/s6-rc/httpd-6-log/notification-fd
@@ -0,0 +1 @@
+3
diff --git a/examples/s6-rc/httpd-6-log/pipeline-name b/examples/s6-rc/httpd-6-log/pipeline-name
new file mode 100644
index 0000000..bccca20
--- /dev/null
+++ b/examples/s6-rc/httpd-6-log/pipeline-name
@@ -0,0 +1 @@
+httpd-6-pipeline
diff --git a/examples/s6-rc/httpd-6-log/run b/examples/s6-rc/httpd-6-log/run
new file mode 100755
index 0000000..50d7448
--- /dev/null
+++ b/examples/s6-rc/httpd-6-log/run
@@ -0,0 +1,5 @@
+#!/bin/execlineb -S1
+
+s6-setuidgid wwwlog
+exec -c
+s6-log -d3 t s1000000 n20 /var/log/httpd-46
diff --git a/examples/s6-rc/httpd-6-log/type b/examples/s6-rc/httpd-6-log/type
new file mode 100644
index 0000000..5883cff
--- /dev/null
+++ b/examples/s6-rc/httpd-6-log/type
@@ -0,0 +1 @@
+longrun
diff --git a/examples/s6-rc/httpd-6/notification-fd b/examples/s6-rc/httpd-6/notification-fd
new file mode 100644
index 0000000..00750ed
--- /dev/null
+++ b/examples/s6-rc/httpd-6/notification-fd
@@ -0,0 +1 @@
+3
diff --git a/examples/s6-rc/httpd-6/producer-for b/examples/s6-rc/httpd-6/producer-for
new file mode 100644
index 0000000..eb26378
--- /dev/null
+++ b/examples/s6-rc/httpd-6/producer-for
@@ -0,0 +1 @@
+httpd-6-log
diff --git a/examples/s6-rc/httpd-6/run b/examples/s6-rc/httpd-6/run
new file mode 100755
index 0000000..ae4dbba
--- /dev/null
+++ b/examples/s6-rc/httpd-6/run
@@ -0,0 +1,10 @@
+#!/bin/execlineb -P
+
+fdmove -c 2 1
+backtick -E ip { pipeline { s6-dnsip6 example.com } head -n 1 }
+s6-envuidgid www
+cd /home/www
+fdmove 1 3
+s6-tcpserver6 -v2 -1 -U -c 512 -- $ip 80
+s6-tcpserver-access -lexample.com --
+tipideed -v2 --
diff --git a/examples/s6-rc/httpd-6/type b/examples/s6-rc/httpd-6/type
new file mode 100644
index 0000000..5883cff
--- /dev/null
+++ b/examples/s6-rc/httpd-6/type
@@ -0,0 +1 @@
+longrun
diff --git a/examples/s6-rc/httpsd-4-log/consumer-for b/examples/s6-rc/httpsd-4-log/consumer-for
new file mode 100644
index 0000000..df47160
--- /dev/null
+++ b/examples/s6-rc/httpsd-4-log/consumer-for
@@ -0,0 +1 @@
+httpsd-4
diff --git a/examples/s6-rc/httpsd-4-log/notification-fd b/examples/s6-rc/httpsd-4-log/notification-fd
new file mode 100644
index 0000000..00750ed
--- /dev/null
+++ b/examples/s6-rc/httpsd-4-log/notification-fd
@@ -0,0 +1 @@
+3
diff --git a/examples/s6-rc/httpsd-4-log/pipeline-name b/examples/s6-rc/httpsd-4-log/pipeline-name
new file mode 100644
index 0000000..52ff5c9
--- /dev/null
+++ b/examples/s6-rc/httpsd-4-log/pipeline-name
@@ -0,0 +1 @@
+httpsd-4-pipeline
diff --git a/examples/s6-rc/httpsd-4-log/run b/examples/s6-rc/httpsd-4-log/run
new file mode 100755
index 0000000..770d831
--- /dev/null
+++ b/examples/s6-rc/httpsd-4-log/run
@@ -0,0 +1,5 @@
+#!/bin/execlineb -S1
+
+s6-setuidgid wwwlog
+exec -c
+s6-log -d3 t s1000000 n20 /var/log/httpsd-4
diff --git a/examples/s6-rc/httpsd-4-log/type b/examples/s6-rc/httpsd-4-log/type
new file mode 100644
index 0000000..5883cff
--- /dev/null
+++ b/examples/s6-rc/httpsd-4-log/type
@@ -0,0 +1 @@
+longrun
diff --git a/examples/s6-rc/httpsd-4/notification-fd b/examples/s6-rc/httpsd-4/notification-fd
new file mode 100644
index 0000000..00750ed
--- /dev/null
+++ b/examples/s6-rc/httpsd-4/notification-fd
@@ -0,0 +1 @@
+3
diff --git a/examples/s6-rc/httpsd-4/producer-for b/examples/s6-rc/httpsd-4/producer-for
new file mode 100644
index 0000000..1c2200a
--- /dev/null
+++ b/examples/s6-rc/httpsd-4/producer-for
@@ -0,0 +1 @@
+httpsd-4-log
diff --git a/examples/s6-rc/httpsd-4/run b/examples/s6-rc/httpsd-4/run
new file mode 100755
index 0000000..54be026
--- /dev/null
+++ b/examples/s6-rc/httpsd-4/run
@@ -0,0 +1,11 @@
+#!/bin/execlineb -P
+
+fdmove -c 2 1
+backtick -E ip { pipeline { s6-dnsip4 example.com } head -n 1 }
+s6-envuidgid www
+export KEYFILE /etc/ssl/acme/private/example.com/key.pem
+export CERTFILE /etc/ssl/acme/example.com/cert.pem
+cd /home/www
+fdmove 1 3
+s6-tlsserver -v -4 -1 -U -c 512 -K 30000 -- $ip 443
+tipideed -v2 --
diff --git a/examples/s6-rc/httpsd-4/type b/examples/s6-rc/httpsd-4/type
new file mode 100644
index 0000000..5883cff
--- /dev/null
+++ b/examples/s6-rc/httpsd-4/type
@@ -0,0 +1 @@
+longrun
diff --git a/examples/s6-rc/httpsd-6-log/consumer-for b/examples/s6-rc/httpsd-6-log/consumer-for
new file mode 100644
index 0000000..f8b60ce
--- /dev/null
+++ b/examples/s6-rc/httpsd-6-log/consumer-for
@@ -0,0 +1 @@
+httpsd-6
diff --git a/examples/s6-rc/httpsd-6-log/notification-fd b/examples/s6-rc/httpsd-6-log/notification-fd
new file mode 100644
index 0000000..00750ed
--- /dev/null
+++ b/examples/s6-rc/httpsd-6-log/notification-fd
@@ -0,0 +1 @@
+3
diff --git a/examples/s6-rc/httpsd-6-log/pipeline-name b/examples/s6-rc/httpsd-6-log/pipeline-name
new file mode 100644
index 0000000..82fd962
--- /dev/null
+++ b/examples/s6-rc/httpsd-6-log/pipeline-name
@@ -0,0 +1 @@
+httpsd-6-pipeline
diff --git a/examples/s6-rc/httpsd-6-log/run b/examples/s6-rc/httpsd-6-log/run
new file mode 100755
index 0000000..a8281ad
--- /dev/null
+++ b/examples/s6-rc/httpsd-6-log/run
@@ -0,0 +1,5 @@
+#!/bin/execlineb -S1
+
+s6-setuidgid wwwlog
+exec -c
+s6-log -d3 t s1000000 n20 /var/log/httpsd-6
diff --git a/examples/s6-rc/httpsd-6-log/type b/examples/s6-rc/httpsd-6-log/type
new file mode 100644
index 0000000..5883cff
--- /dev/null
+++ b/examples/s6-rc/httpsd-6-log/type
@@ -0,0 +1 @@
+longrun
diff --git a/examples/s6-rc/httpsd-6/notification-fd b/examples/s6-rc/httpsd-6/notification-fd
new file mode 100644
index 0000000..00750ed
--- /dev/null
+++ b/examples/s6-rc/httpsd-6/notification-fd
@@ -0,0 +1 @@
+3
diff --git a/examples/s6-rc/httpsd-6/producer-for b/examples/s6-rc/httpsd-6/producer-for
new file mode 100644
index 0000000..7a7db95
--- /dev/null
+++ b/examples/s6-rc/httpsd-6/producer-for
@@ -0,0 +1 @@
+httpsd-6-log
diff --git a/examples/s6-rc/httpsd-6/run b/examples/s6-rc/httpsd-6/run
new file mode 100755
index 0000000..652a354
--- /dev/null
+++ b/examples/s6-rc/httpsd-6/run
@@ -0,0 +1,11 @@
+#!/bin/execlineb -P
+
+fdmove -c 2 1
+backtick -E ip { pipeline { s6-dnsip6 example.com } head -n 1 }
+s6-envuidgid www
+export KEYFILE /etc/ssl/acme/private/example.com/key.pem
+export CERTFILE /etc/ssl/acme/example.com/cert.pem
+cd /home/www
+fdmove 1 3
+s6-tlsserver -v -6 -1 -U -c 512 -K 30000 -- $ip 443
+tipideed -v2 --
diff --git a/examples/s6-rc/httpsd-6/type b/examples/s6-rc/httpsd-6/type
new file mode 100644
index 0000000..5883cff
--- /dev/null
+++ b/examples/s6-rc/httpsd-6/type
@@ -0,0 +1 @@
+longrun
diff --git a/examples/tipidee.conf b/examples/tipidee.conf
new file mode 100644
index 0000000..f75a9cc
--- /dev/null
+++ b/examples/tipidee.conf
@@ -0,0 +1,41 @@
+### Global definitions
+
+# After 1 minute without a new request, exit
+global read_timeout 60000
+
+# If the client fails to read a response for 1 minute, exit
+global write_timeout 60000
+
+# If a CGI script takes more than 10s to run, kill it and respond 504 instead
+global cgi_timeout 10000
+
+# Serve .ini and .cfg files as plain text
+content-type text/plain .ini .cfg
+
+
+### Definitions for the example.com virtual domain
+domain example.com
+
+# CGI scripts called nph-foobar are considered non-parsed-headers
+nph-prefix nph-
+
+# CGI scripts live under /cgi-bin
+cgi /cgi-bin/
+
+# Serve http://example.com/README as plain text
+file-type /README text/plain
+
+# Redirect http://example.com/rickroll to a fan favorite video.
+# Make it temporary to avoid revealing the trick in the client.
+redirect /rickroll 307 https://www.youtube.com/watch?v=dQw4w9WgXcQ
+
+# Permanently redirect http://example.com/community/foobar... requests
+# to https://example.org/foobar...
+redirect /community/ 308 https://example.org
+
+
+### Definitions for the example.org virtual domain
+domain example.org
+
+nph-prefix nph-
+cgi /cgi-bin/