Domain subfolders exist. Nginx roots are pointed at them. Every domain except 1.foo is now 404. 170 files sit in /mnt/public/ waiting to be sorted.
1.foo still serves from /mnt/public/ directly โ it sees everything. This is intentional. 1.foo is the main vault and gets to keep all the documents that don't explicitly belong elsewhere.
Strategy: Move the specific files OUT of the flat directory INTO their domain subfolders. Everything left behind stays accessible via 1.foo.
Each domain gets only the files that are specifically about that domain. 1.foo keeps everything else.
/mnt/public/0.foo/domain-status.htmllocation / { root ...; try_files ... } โ needs an index or the monitor file needs to be the index
/mnt/public/clankers.discount/index.html/mnt/public/clankers.discount/clankers-backups/
/etc/nginx/sites-enabled/default, not domains.conf. Its root needs to be updated separately to /mnt/public/patty.adult.
Everything not listed above. That's ~140 files including:
Run the moves listed in Section II. All mv operations within the same filesystem โ instant, no copy needed.
cd /mnt/public # 0.foo mv domain-status.html 0.foo/ # 123.foo mv 123.foo.html 123.foo/index.html mv 123.foo-backup-20260315.html 123.foo/ # 12345.foo mv 12345.foo.html 12345.foo/index.html mv 12345.foo-backup-20260315.html 12345.foo/ # clankers.discount mv clankers.html clankers.discount/index.html mv clankers-backup-20260315.html clankers.discount/ mv clankers-backups clankers.discount/ # flawless.engineering mv flawless-engineering.html flawless.engineering/index.html mv flawless-engineering-20260316-0748z.html flawless.engineering/ mv flawless-engineering-20260316-1510pm.html flawless.engineering/ mv flawless.html flawless.engineering/ # patty.adult mv patty-adult.html patty.adult/index.html mv patty-adult-drudge.html patty.adult/ mv patty-adult-v2-ivory.html patty.adult/ # drip.xxx cp drip-xxx-site/index.html drip.xxx/index.html mv drip-xxx.html drip.xxx/ mv drip-xxx-20260317-2024z.html drip.xxx/ mv drip-game.html drip.xxx/ ln -sf /mnt/public/drip drip.xxx/drip # if-anyone-builds-it-everyone-dies.* mv dies-help.html if-anyone-builds-it-everyone-dies.help/index.html mv dies-rip.html if-anyone-builds-it-everyone-dies.rip/index.html
Why: Every domain that had content should now be back online.
Check: Run domain monitor. Expected: 0.foo, 123.foo, 12345.foo, clankers.discount, flawless.engineering should be 200 again. Single-digit .foo domains stay 403 (correct โ they're empty).
How to continue: All domain-specific sites verified working.
Two scripts write to the old paths:
domain-monitor.py: change output from /mnt/public/domain-status.html to /mnt/public/0.foo/domain-status.htmlfleet-monitor.py: change output from /mnt/public/clankers.html to /mnt/public/clankers.discount/index.html + update backup dirpatty.adult is in /etc/nginx/sites-enabled/default. Its root needs to change from /mnt/public to /mnt/public/patty.adult.
cd /mnt && git add -A && git commit -m "file migration: domain isolation complete"