A random thought I had while reading this (specifically about the the physical location) is I wonder if there's a way to limit your website/server to a local region. Similar to how BBS were back in the day.
Something similar occurred to me while writing the piece—and then I instantly thought that to a degree that's what China has built behind the Great Firewall, and one should always be careful what one asks for.
And yet. There's something to the idea. Something very "art project"-esque where certain web pages were only available when you're physically in a specific area could be fun, at first. Could also be incredibly restrictive.
There are, but they all obviously involve means that most people here would call heresy and sacrilege: The tracking of users' IP addresses, user agents, operating system regional and language settings, etc.
You don't need to do all this though. Just look at NextDoor.com, it works fine for mostly only having locals. And the results are disastrous: it's the most toxic place on the internet.
Ip addresses don't need to be tracked for that. It could be done with a proxy that just refuses access to ips not in the right location. although i think it could be very annoying for users. some use tor or vpns, my just keep my websites open to everyone.