tomatenmharksite documentation
documentation of how the tomatenmharksite server works for people who care or people who keep forgetting (me)
links
In the "running" section on the website, the ids may or may not be links.
If a /srv/tomatenmhark-slashinfo/*
entry exists, the link will point to that info site,
If only a /srv/tomatenmhark-redirect/*
entry exists, the link will follow that redirect,
and if neither exist, there will be no link.
In the "everything else" section, every entry links to its info page.
/tmp/tomatenmhark-status-*
For each file /tmp/tomatenmhark-status-*
, an entry will be created on tomatenmhark.org.
This entry will have the id *
and the file's contents will be shown after that.
/srv/tomatenmhark-dystatus/*
Each file in /srv/tomatenmhark-dystatus/
acts like a /tmp/tomatenmhark-status-*
file,
but instead of displaying its contents, the tomatenmharksite server will execute the file and display its output.
/srv/tomatenmhark-slashinfo/*
The files in /srv/tomatenmhark-slashinfo/
are served under /info, and index.html
will be served
when a directory is requested (/
→ /index.html
, /thing
→ /thing/index.html
).
For all directories in /srv/tomatenmhark-slashinfo/
which contain a desc
and are not already listed as "running", an entry is created in the "everything else" section.
/srv/tomatenmhark-redirect/*
Each file in /srv/tomatenmhark-redirect/
contains a port number or a domain, leading/trailing whitespace characters are ignored.
If the file contains a port number, /filename/...
will be redirected to samedomain:portnumber/...
.
If the file contains anything else, /filename/...
will be redirected to filecontent/...
.
In the port number case, http
is used. Otherwise, the protocol must be included in the file.
%DOMAIN%
will be replaced with tomatenmhark.org
or whatever domain was used in the request.
To redirect to port 8000
using https
, use https://%DOMAIN%:8000