From e03fc07cc71db2eb99287ef23f66cdf6bfba34a0 Mon Sep 17 00:00:00 2001 From: Christian Cleberg Date: Sun, 10 May 2026 13:02:27 -0500 Subject: fix: add redirect file cleberg.net --- linux/nginx/etc/nginx/conf.d/cleberg.net.conf | 2 +- linux/nginx/etc/nginx/custom.d/redirects/blog.conf | 139 +++++++++++++++++++++ 2 files changed, 140 insertions(+), 1 deletion(-) create mode 100644 linux/nginx/etc/nginx/custom.d/redirects/blog.conf (limited to 'linux/nginx') diff --git a/linux/nginx/etc/nginx/conf.d/cleberg.net.conf b/linux/nginx/etc/nginx/conf.d/cleberg.net.conf index 165e50c..f01416f 100644 --- a/linux/nginx/etc/nginx/conf.d/cleberg.net.conf +++ b/linux/nginx/etc/nginx/conf.d/cleberg.net.conf @@ -49,7 +49,7 @@ server { location /atom.xml { return 301 $scheme://$host/feed.xml; } location /blog/salary-transparency.html { return 301 $scheme://$host/salary/; } - location = /.well-known/ { return 404; } + include custom.d/redirects/blog.conf; } server { diff --git a/linux/nginx/etc/nginx/custom.d/redirects/blog.conf b/linux/nginx/etc/nginx/custom.d/redirects/blog.conf new file mode 100644 index 0000000..55bd584 --- /dev/null +++ b/linux/nginx/etc/nginx/custom.d/redirects/blog.conf @@ -0,0 +1,139 @@ +# Legacy blog redirects + +location = /blog/how-to-set-up-a-vps-web-server { + return 301 /blog/vps-web-server.html; +} + +location = /blog/how-to-set-up-a-vps-web-server.html { + return 301 /blog/vps-web-server.html; +} + +location = /blog/doom-emacs-org-mode.html { + return 301 /blog/doom-emacs.html; +} + +location = /blog/2020-01-25-aes-encryption.html { + return 301 /blog/aes-encryption.html; +} + +location = /blog/2020-01-26-steam-on-ntfs-drives.html { + return 301 /blog/steam-on-ntfs.html; +} + +location = /blog/updating-dynamic-dns-with-cloudflare-api { + return 301 /blog/cloudflare-dns-api.html; +} + +location = /blog/launching-a-gemini-capsule.html { + return 301 /blog/gemini-capsule.html; +} + +location = /blog/jumping-back-into-photography { + return 301 /blog/photography.html; +} + +location = /blog/jumping-back-into-photography.html { + return 301 /blog/photography.html; +} + +location = /blog/i-passed-the-cisa.html { + return 301 /blog/cisa.html; +} + +location = /blog/fedora-remove-login-manager.html { + return 301 /blog/fedora-login-manager.html; +} + +location = /blog/corporate-security.html { + return 301 /blog/internal-audit.html; +} + +location = /blog/secure-your-network-with-the-uncomplicated-firewall { + return 301 /blog/ufw.html; +} + +location = /blog/secure-your-network-with-the-uncomplicated-firewall.html { + return 301 /blog/ufw.html; +} + +location = /blog/running-flatpak-apps-easily.html { + return 301 /blog/flatpak-symlinks.html; +} + +location = /blog/random-mullvad-wireguard { + return 301 /blog/random-wireguard.html; +} + +location = /blog/note-taking.html { + return 301 /blog/reliable-notes.html; +} + +location = /blog/matrix-synapse.html { + return 301 /blog/self-hosting-matrix.html; +} + +location = /blog/macos-testing-out-a-new-os { + return 301 /blog/macos.html; +} + +location = /blog/hosting-a-gemini-server.html { + return 301 /blog/gemini-server.html; +} + +location = /blog/gitweb.html { + return 301 /blog/self-hosting-gitweb.html; +} + +location = /blog/freshrss.html { + return 301 /blog/self-hosting-freshrss.html; +} + +location = /blog/foss-macos-apps { + return 301 /blog/macos.html; +} + +location = /blog/foss-macos-apps.html { + return 301 /blog/macos.html; +} + +location = /blog/doom-emacs { + return 301 /blog/doom-emacs.html; +} + +location = /blog/digital-minimalism { + return 301 /blog/digital-minimalism.html; +} + +location = /blog/cryptography-basics.html { + return 301 /blog/cryptography.html; +} + +location = /blog/alpine-desktop { + return 301 /blog/alpine-desktop.html; +} + +location = /blog/salary-transparency { + return 301 /salary/; +} + +# Bad/bot paths + +location = /blog/wp-login.php { + return 410; +} + +location = /blog/signatur.php { + return 410; +} + +location = /blog/data:, { + return 410; +} + +location = /org/blog/index.org { + return 410; +} + +location = /.well-known/ { + return 404; +} -- cgit v1.2.3