[wpdd-discuss] [PATCH www v2] Add instructions for testing out the site locally

Jason Yundt jason at jasonyundt.email
Wed Oct 5 17:30:38 EDT 2022


The goal of this change is to allow contributors to test out their
contributions before submitting them.

I chose to use port 49152 since it’s the first private port [1]. I could
have used the default ports for HTTP or HTTPS, but using those ports
requires root access.

[1]: <https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml>
---
 README             |  8 ++++++++
 test-lighttpd.conf | 15 +++++++++++++++
 2 files changed, 23 insertions(+)
 create mode 100644 test-lighttpd.conf

diff --git a/README b/README
index 771e1f5..548247c 100644
--- a/README
+++ b/README
@@ -1,6 +1,14 @@
 This is the website for the Worldwide Public Domain Dedication (WPDD): 
 https://wpdd.info/
 
+Here's how you can test out the site locally:
+1. Make sure that you have lighttpd installed:
+   https://www.lighttpd.net/
+2. Change directory to the root of this repo.
+3. Run "lighttpd -D -f test-lighttpd.conf"
+4. Open a Web browser and go to:
+   http://localhost:49152/
+
 Aside from trademarks, this work is licensed under the Creative 
 Commons Attribution-ShareAlike 4.0 International License: 
 http://creativecommons.org/licenses/by-sa/4.0/
diff --git a/test-lighttpd.conf b/test-lighttpd.conf
new file mode 100644
index 0000000..22f29e2
--- /dev/null
+++ b/test-lighttpd.conf
@@ -0,0 +1,15 @@
+# This file is dedicated to the public domain using the CC0 1.0
+# Universal Public Domain Dedication:
+# https://creativecommons.org/publicdomain/zero/1.0/
+
+server.document-root = var.CWD
+server.port = 49152
+index-file.names = ( "index.html" )
+
+mimetype.assign = (
+  ".html" => "text/html",
+  ".css" => "text/css"
+)
+
+server.modules = ("mod_ssi")
+ssi.extension = (".html")
-- 
2.36.2



More information about the Discuss mailing list