From 1a8cc7e1b3f48be6e5cf140bfe7d2998e7a19615 Mon Sep 17 00:00:00 2001 From: David Ball Date: Thu, 23 May 2024 18:35:13 -0400 Subject: [PATCH] Added defunct Caddyfile configuration. --- Caddyfile | 28 ++++++++++++++++++++++++++++ redirects.Caddyfile | 27 +++++++++++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 Caddyfile create mode 100644 redirects.Caddyfile diff --git a/Caddyfile b/Caddyfile new file mode 100644 index 00000000..e26bff50 --- /dev/null +++ b/Caddyfile @@ -0,0 +1,28 @@ +russell-county-archives.daball.me { + import /etc/caddy/tls-dns-cloudflare + encode gzip + redir * https://no-moss-3-carbo-landfill-library.online{uri} permanent +} + +no-moss-3-carbo-landfill-library.online { + import /etc/caddy/tls-dns-cloudflare + + encode gzip + + root * /srv/www/no-moss-3-carbo-landfill-library.online + + @node_search path /search* + reverse_proxy @node_search localhost:3000 + + @ext_html path_regexp ^.*\.(htm|html)$ + rewrite @ext_html archived.php + php_fastcgi unix//var/run/php/php8.2-fpm.sock + + import redirects.Caddyfile + + file_server { + root /srv/www/no-moss-3-carbo-landfill-library.online/public + index index.nofile + browse /srv/www/no-moss-3-carbo-landfill-library.online/browse.html + } +} diff --git a/redirects.Caddyfile b/redirects.Caddyfile new file mode 100644 index 00000000..cebb7586 --- /dev/null +++ b/redirects.Caddyfile @@ -0,0 +1,27 @@ +# These files have been moved from their original locations + +# Board of Supervisor Web Site Archives +# Matches /YYYY-MM-DD_HH_MM* +@match_old_website_archive_url path_regexp old_website_archive_url "^/(\d{4})-(\d{2})-(\d{2})_(\d{2})_(\d{2})(.*)$" +redir @match_old_agenda_packet_url https://no-moss-3-carbo-landfill-library.online/Russell_County_BOS/Web_Site_Archives/Russell-County-Web-Site_{re.old_website_archive_url.1}-{re.old_website_archive_url.2}-{re.old_website_archive_url.3}_{re.old_website_archive_url.4}_{re.old_website_archive_url.5}{re.old_website_archive_url.6} permanent +redir /OCR-Encoded-PDFs/Russell-County-Web-Site_2024-02-13_19_50_Modified-With-OCR-Encoding.zip https://no-moss-3-carbo-landfill-library.online/Russell_County_BOS/Web_Site_Archives/Russell-County-Web-Site_2024-02-13_19_50_Modified-With-OCR-Encoding.zip permanent +redir /OCR-Encoded-PDFs* https://no-moss-3-carbo-landfill-library.online/Russell_County_BOS/Web_Site_Archives{uri} permanent +redir /Russell-County-Web-Site_*.zip* https://no-moss-3-carbo-landfill-library.online/Russell_County_BOS/Web_Site_Archives{uri} permanent + +# Board of Supervisors YouTube Archive +redir "/YouTube Channel.zip*" https://no-moss-3-carbo-landfill-library.online/Russell_County_BOS/YouTube_Channel.zip permanent +@match_old_youtube_channel path_regexp old_youtube_channel "^/YouTube Channel(.*)$" +redir @match_old_youtube_channel https://no-moss-3-carbo-landfill-library.online/Russell_County_BOS/YouTube_Channel{re.old_youtube_channel.1} permanent + +# IDA Agenda Packets +redir /IDA_AgendaPackets.zip* https://no-moss-3-carbo-landfill-library.online/Russell_County_IDA{uri} permanent +@match_old_agenda_packet_url path_regexp old_agenda_packet_url "^/IDA_AgendaPackets/(\d{4})-(\d{2})-(\d{2})_IDA_AgendaPacket\.pdf$" +redir @match_old_agenda_packet_url https://no-moss-3-carbo-landfill-library.online/Russell_County_IDA/Agenda_Packets/{re.old_agenda_packet_url.1}-{re.old_agenda_packet_url.2}-{re.old_agenda_packet_url.3}_IDA_Agenda_Packet.pdf permanent + +# Save Russell County Archive +redir /SaveRussellCountyMirror_2024_02_16.zip* https://no-moss-3-carbo-landfill-library.online/Save_Russell_County/Web_Site_Archives/Save_Russell_County_2024_02_16.zip permanent +@match_old_save_russell_county_url path_regexp old_save_russell_county_url "^/SaveRussellCountyMirror_2024_02_16(.*)$" +redir @match_old_save_russell_county_url https://no-moss-3-carbo-landfill-library.online/Save_Russell_County/Web_Site_Archives/Save_Russell_County_2024_02_16{re.old_save_russell_county_url.1} permanent + +# VADMME YouTube Video +redir "/Project Reclaim [WI19KR9Ogwg].mkv*" "https://no-moss-3-carbo-landfill-library.online/Save_Russell_County/YouTube_Archives/@VADMME/Project Reclaim [WI19KR9Ogwg].mkv" \ No newline at end of file