News for hackers. Stuff that matters.
Re:Userdir URLs like https://example.org/~username/ are dang... by jlgaddis on Thursday April 09, 2020 @11:52AM (#22823718)
Pretty much all modern web servers support per-user virtual hosts using wildcards that allow for URLs like http://username.users.example.org/ (instead of http://users.example.org/~username/ when using mod_userdir).

Unless I'm missing something, it seems that this would eliminate most of the issues raised in the article by using a separate subdomain for each user/site.

Using lighttpd, you can do this with this very simple configuration [0]:

  $HTTP["host"] =~ "users\.example\.org" {
      evhost.path-pattern = "/home/%4/public_html/" 
  }
Add a "wildcard" record for "*.users.example.org" pointing to the proper host to your DNS zone and you're all set.

---

[0]: https://redmine.lighttpd.net/projects/lighttpd/wiki/Docs_Mod...

There are no comments on this comment yet.