3 ms·
Pretty much all modern web servers support per-user virtual hosts using wildcards that allow for URLs like http://username.users.example.org/ http://username.us
by jlgaddis 7y ago
Pretty much all modern web servers support per-user virtual hosts using wildcards that allow for URLs like http://username.users.example.org/ http://username.users.example.org/ (instead of http://users.example.org/~username/ 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_ModEVhost#Samples https://redmine.lighttpd.net/projects/lighttpd/wiki/Docs_Mod...