diff options
| -rw-r--r-- | cgit.html | 28 | ||||
| -rw-r--r-- | tor.html | 20 |
2 files changed, 21 insertions, 27 deletions
@@ -42,13 +42,12 @@ You should have an NGINX server running with a TLS certificate by now. Add the following configuration to your server to pass the requests to Cgit, while serving static files directly:</p> - <pre><code> -server { + <pre><code>server { listen 443 ssl; listen [::]:443 ssl; - ssl_certificate /etc/ssl/nginx/<strong>git.example.org</strong>.crt; - ssl_certificate_key /etc/ssl/nginx/<strong>git.example.org</strong>.key; - server_name <strong>git.example.org</strong>; + ssl_certificate /etc/ssl/nginx/<strong>git.example.org</strong>.crt; + ssl_certificate_key /etc/ssl/nginx/<strong>git.example.org</strong>.key; + server_name <strong>git.example.org</strong>; root /usr/share/cgit ; try_files $uri @cgit ; @@ -60,8 +59,7 @@ server { fastcgi_param QUERY_STRING $query_string; fastcgi_pass unix:/run/fcgiwrap.socket; } -} - </code></pre> +}</code></pre> <p>Then get NGINX to reload your configuration.</p> @@ -70,8 +68,7 @@ server { To change this, we need to configure Cgit to our liking, by editing <code>/etc/cgitrc</code>. </p> - <pre><code> -css=/cgit.css + <pre><code>css=/cgit.css logo=/cgit.svg virtual-root=/ @@ -80,8 +77,7 @@ root-title=<strong>Chad's git server</strong> root-desc=<strong>A web interface to LandChad's git repositories, powered by Cgit</strong> # The location where git repos are stored on the server -scan-path=/srv/git/ - </code></pre> +scan-path=/srv/git/</code></pre> <p>This configuration assumes you followed the <a href="/git">git hosting guide</a> and store your repositories on the <code>/srv/git/</code> directory.</p> @@ -96,9 +92,7 @@ scan-path=/srv/git/ user to give it your name:</p> - <pre><code> -usermod -c "<strong>Your Name</strong>" git - </code></pre> + <pre><code>usermod -c "<strong>Your Name</strong>" git</code></pre> <h3>Changing the repository description</h3> @@ -110,8 +104,7 @@ usermod -c "<strong>Your Name</strong>" git to determine the idle time. Inside your repository, create a file <code>hooks/post-receive</code> and add the following contents:</p> - <pre><code> -#!/bin/sh + <pre><code>#!/bin/sh agefile="$(git rev-parse --git-dir)"/info/web/last-modified @@ -119,8 +112,7 @@ mkdir -p "$(dirname "$agefile")" && git for-each-ref \ --sort=-authordate --count=1 \ --format='%(authordate:iso8601)' \ - >"$agefile" - </code></pre> + >"$agefile"</code></pre> <p>And give it execution permissions with:</p> @@ -22,19 +22,21 @@ <h3>Installing Tor</h3> - <p>Firstly we need to add the Tor repos to our system to get the latest version of Tor:</p> + <p>First, we need to ensure that our CPU architecture is supported. Ensure that it is either amd64, arm64, or i386:</p> + <pre><code>dpkg --print-architecture</code></pre> + + <p>We need to <a href="https://support.torproject.org/apt/tor-deb-repo/">add the Tor repos to our system</a> to get the latest version of Tor:</p> <pre><code>apt install -y apt-transport-https gpg -echo "deb https://deb.torproject.org/torproject.org buster main -deb-src https://deb.torproject.org/torproject.org buster main" > /etc/apt/sources.list.d/tor.list</code></pre> +echo "deb [signed-by=/usr/share/keyrings/tor-archive-keyring.gpg] https://deb.torproject.org/torproject.org $(lsb_release -cs) main +deb-src [signed-by=/usr/share/keyrings/tor-archive-keyring.gpg] https://deb.torproject.org/torproject.org $(lsb_release -cs) main" > /etc/apt/sources.list.d/tor.list</code></pre> - <p>Then we need to add the gpg keys to our keyring:</p> + <p>Then we need to add the GPG keys to our keyring:</p> - <pre><code>curl -s https://deb.torproject.org/torproject.org/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.asc | gpg --import -gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | apt-key add -</code></pre> + <pre><code>curl -s https://deb.torproject.org/torproject.org/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.asc | gpg --dearmor > /usr/share/keyrings/tor-archive-keyring.gpg</code></pre> - <p>Now update and install Tor:</p> + <p>Now install Tor:</p> - <pre><code>apt update + <pre><code>apt update apt install tor deb.torproject.org-keyring</code></pre> <h3>Enabling Tor</h3> @@ -104,6 +106,6 @@ apt install tor</code></pre> <p><strong>Contributor</strong> - <a href="https://tomfasano.co" target="_blank">tomfasano.co</a></p> </main> - <footer><a href="https://landchad.net">LandChad.net</a></br>Because Everyone should be an Internet LandChad.</br><a href="index.html"><li><img src="pix/chad.gif" alt="chad"></li></a><a href="rss.xml"><li><img src="pix/rss.svg" alt="RSS"></li></a><a href="donate-bitcoin.html"><li><img src="pix/btc.svg" alt="BTC"></li></a><a href="donate-monero.html"><li><img src="pix/xmr.svg" alt="XMR"></li></a><a href="https://github.com/lukesmithxyz/landchad"><li><img src="pix/git.svg" alt="Github"></li></a></footer> + <footer><a href="https://landchad.net">LandChad.net</a></br>Because Everyone should be an Internet LandChad.</br><a href="index.html"><li><img src="pix/chad.gif" alt="chad"></li></a><a href="rss.xml"><li><img src="pix/rss.svg" alt="RSS"></li></a><a href="donate-bitcoin.html"><li><img src="pix/btc.svg" alt="BTC"></li></a><a href="donate-monero.html"><li><img src="pix/xmr.svg" alt="XMR"></li></a><a href="https://github.com/lukesmithxyz/landchad"><li><img src="pix/git.svg" alt="Github"></li></a></footer> </body> </html> |
