https://wiki.csclub.uwaterloo.ca/index.php?title=Shlink&feed=atom&action=historyShlink - Revision history2024-03-29T12:14:53ZRevision history for this page on the wikiMediaWiki 1.39.4https://wiki.csclub.uwaterloo.ca/index.php?title=Shlink&diff=4873&oldid=prevR389li: Add setup instructions2022-09-10T18:58:04Z<p>Add setup instructions</p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 13:58, 10 September 2022</td>
</tr><tr>
<td colspan="2" class="diff-lineno">Line 8:</td>
<td colspan="2" class="diff-lineno">Line 8:</td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Usage ==</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Usage ==</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Links can be managed at [https://links.csclub.uwaterloo.ca links.csclub.uwaterloo.ca], or through the CLI (currently restricted to the <code>staff</code> group).</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Links can be managed at [https://links.csclub.uwaterloo.ca links.csclub.uwaterloo.ca], or through the CLI (currently restricted to the <code>staff</code> group).</div></td>
</tr>
<tr>
<td colspan="2" class="diff-empty diff-side-deleted"></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>[[File:Shlink1.png|none|thumb|When you open it for the first time, you will see an interface that looks like this. Click '''Add a server'''.]]</div></td>
</tr>
<tr>
<td colspan="2" class="diff-empty diff-side-deleted"></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>[[File:Shlink2.png|none|thumb|Enter the details as follows. Name: <code>csclub.ca</code> URL: <code><nowiki>https://csclub.ca</nowiki></code> API key: The exec API key (in the usual exec passwords location, or ask an exec for it if you aren't one)]]</div></td>
</tr>
<tr>
<td colspan="2" class="diff-empty diff-side-deleted"></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>On the next interface, '''custom slug''' is the part of the URL that can be customized. If it is left blank, a random 4-character slug will be generated.</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Use the <code>csctest</code> parameter to disable tracking on test requests.</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Use the <code>csctest</code> parameter to disable tracking on test requests.</div></td>
</tr>
</table>R389lihttps://wiki.csclub.uwaterloo.ca/index.php?title=Shlink&diff=4866&oldid=prevR389li: Create page2022-08-29T06:11:25Z<p>Create page</p>
<p><b>New page</b></p><div>[https://shlink.io/ Shlink] is a self-hosted URL shortener. We run an instance on [[Machine List#caffeine|caffeine]], currently for exec-use only.<br />
<br />
== Installation Details ==<br />
Shlink was installed manually (as of F2022 there is currently no Debian package for it). Its files are in <code>/usr/local/lib/shlink</code> on caffeine, with a symlink of <code>bin/cli</code> (the Shlink CLI) to <code>/usr/local/bin/shlink</code> as recommended by Shlink's docs. Due to Shlink only supporting PHP 8.2, which is in debian-unstable at the moment, the installation and CLI scripts were modified to use the <code>php8.2</code> binary installed from <code>packages.sury.org</code>.<br />
<br />
The web client (used to manage shortlinks graphically, the other option being the CLI) sources are located in <code>/usr/local/bin/shlink/web-client/</code>. Apache is configured (through <code>sites-available/csc-links.conf</code> and <code>sites-real/csc-links</code>) to serve actual shortlinks through [https://csclub.ca csclub.ca] (which itself redirects to the CSC homepage) and the web client through [https://links.csclub.uwaterloo.ca links.csclub.uwaterloo.ca].<br />
<br />
== Usage ==<br />
Links can be managed at [https://links.csclub.uwaterloo.ca links.csclub.uwaterloo.ca], or through the CLI (currently restricted to the <code>staff</code> group).<br />
<br />
Use the <code>csctest</code> parameter to disable tracking on test requests.</div>R389li