commit cd5489f39be8de0db4de737fba5536099f6d242b
Author: mod <mod@buni.party>
Date: Fri Feb 13 21:36:36 2026 +0000
diff --git a/docs/sites/index.html b/docs/sites/index.html
new file mode 100644
index 0000000..3fafdcb
--- /dev/null
+++ b/docs/sites/index.html
@@ -00 +160 @@
+!!
+$DPP "Groupnix User Websites" "User Websites" <template/head.html #>
+$DPP <template/bar.html #>
+!!
+
+<p>
+Each user on Groupnix has access to their own website. If your user is USER,
+then your website can be found at <code>https://u.buni.party/USER</code>.
+</p>
+
+<h3>Filesystem Structure</h3>
+<p>
+Your user website is stored in <code>~/web</code>. This directory has the
+following hierarchy:
+</p>
+<pre><code>
+~/web/
+|__ noserv/
+| |__ secrets
+|__ cgi-bin/
+| |__ hello.sh*
+|__ index.html
+</code></pre>
+<p>
+Your <code>web</code> directory should be owned by your user but have the group
+<code>www-data</code>. It will also have the SGID bit. These two things should
+not be changed since they allow nginx (which is the HTTP server being used on
+Groupnix) to actually access your website and serve it. Additionally, you should
+not change the owner/group of any files you add in the <code>web</code>
+directory.
+</p>
+<p>
+The <code>cgi-bin</code> directory can hold
+<a class="out" href="https://en.wikipedia.org/wiki/Common_Gateway_Interface">CGI scripts</a>.
+This means that files in that directory (if they are marked executable) will be
+run as scripts instead of being served statically. This allows you to create
+dynamic websites. Note, however, that CGI scripts will run as the www-data user
+and so only have access to your <code>~/web</code> directory, not your whole
+user directory.
+</p>
+<p>
+Finally, the <code>noserv</code> directory contains anything that you do not
+want nginx to serve. So, if you have a file <code>noserv/secrets</code>, then
+the endpoint <code>https://u.buni.party/USER/noserv/secrets</code> will fail.
+</p>
+
+<h3>Using the Web</h3>
+<p>
+Given a URL, the web server will either try to find a matching file in your web
+directory or, if it finds a directory instead, will try to serve
+<code>index.html</code> in that directory. If the path is in the
+<code>cgi-bin</code> directory, the CGI script will be executed and its output
+will be served as the web page. It is important to note that paths in your HTML
+documents must be relative or absolute with respect to your current user. For
+instance, if you are USER and you want to link your stylesheet, you must use a
+relative path of the form <code>style.css</code> or an absolute path of the form
+<code>/USER/style.css</code>.
+</p>
+
+!!$DPP <template/foot.html #>