From 724d8d47d68bf15067174761097ddc148526110a Mon Sep 17 00:00:00 2001 From: Barrett Ruth Date: Sun, 9 Nov 2025 17:15:04 -0500 Subject: [PATCH] fix --- src/content/software/hosting-a-git-server.mdx | 69 +++++++++++++++++++ 1 file changed, 69 insertions(+) diff --git a/src/content/software/hosting-a-git-server.mdx b/src/content/software/hosting-a-git-server.mdx index c68bf85..89e5def 100644 --- a/src/content/software/hosting-a-git-server.mdx +++ b/src/content/software/hosting-a-git-server.mdx @@ -95,3 +95,72 @@ $ sudo git config --system init.defaultBranch main - **It feels great to do things yourself**: I used GPT-4o for linux server command help, that was about it - **Always ask "what is this?" before using something**: this would've saved me hours of realizing a 12 year old perl script should not have been running my git ui. + +# update: moving to lightsail 09/11/2025 + +Welp, ec2 costed way too much (~$15/mo!). Enter [AWS Lightsail](https://aws.amazon.com/lightsail/): small compute with a flat $5/mo charge. This is a reasonably "scalable" solution for my website—unfortunately I do not have too much traffic as of now. + +Anyways, the migration is complete. Everything is nearly identical but my HTTPD config has been minimally updated as follows: +- Now that I host project descriptions on `https://barrettruth.com/git/.html` and gists on `https://barrettruth.com/gist/`, support `{git,gist}.barrettruth.com->barrettruth.com/{git,gist}.html` +- Minify and simplify letsencrypt logic for the domain + +Here's the updated config: + +```apacheconf + + ServerName git.barrettruth.com + Redirect permanent / https://barrettruth.com/git.html + + + + ServerName gist.barrettruth.com + Redirect permanent / https://barrettruth.com/gist.html + + + + ServerName git.barrettruth.com + + SSLEngine on + SSLCertificateFile /etc/letsencrypt/live/git.barrettruth.com/fullchain.pem + SSLCertificateKeyFile /etc/letsencrypt/live/git.barrettruth.com/privkey.pem + Include /etc/letsencrypt/options-ssl-apache.conf + + Redirect "/" "https://barrettruth.com/git.html" + + ErrorLog /var/log/httpd/unified.log + CustomLog /var/log/httpd/unified.log combined + + + + ServerName gist.barrettruth.com + + SSLEngine on + SSLCertificateFile /etc/letsencrypt/live/git.barrettruth.com/fullchain.pem + SSLCertificateKeyFile /etc/letsencrypt/live/git.barrettruth.com/privkey.pem + Include /etc/letsencrypt/options-ssl-apache.conf + + Redirect "/" "https://barrettruth.com/gist.html" + + ErrorLog /var/log/httpd/unified.log + CustomLog /var/log/httpd/unified.log combined + + + + ServerName barrettruth.com + + SSLEngine on + SSLCertificateFile /etc/letsencrypt/live/git.barrettruth.com/fullchain.pem + SSLCertificateKeyFile /etc/letsencrypt/live/git.barrettruth.com/privkey.pem + Include /etc/letsencrypt/options-ssl-apache.conf + + DocumentRoot /var/www/html + + Options -Indexes +FollowSymLinks + AllowOverride All + Require all granted + + + ErrorLog /var/log/httpd/unified.log + CustomLog /var/log/httpd/unified.log combined + +```