← Back to context

Comment by chasd00

1 day ago

i think Apache sets this up by default or use to. Every user on Linux would get a www, or maybe it was htdocs, folder in their home directory when they were added to the system. Any file you put there is served by Apache at resource /~<username> which was reading from /home/<username>/www on the file system.

There use to be lots and lots of ISPs and so they were small enough to have a single webserver with all their customers setup as users and Apache serving content. They'd also setup FTP on the same server so you could get your html files into your www folder. Software like Dreamweaver had a ftp client built in, so you'd click like a "publish" button and it wold login to FTP and transfer your files.

i would imagine this went away because it got expensive as the customer base grew and ISPs consolidated and it made no money. Other options with php, mysql, and other services cropped up and could offer more and charge for it so I think ISPs just preferred to concentrate on network access and not hosting websites.

Apache doesn't have it on by default but easy to turn it on. It's called usermod or mod_user. By default it's the ~/www directory. So, anyone with /home/<name>/www ends up being site.url/~<name>/

It is also possible to add .htaccess and other things there, like username/password challenge (WWW-Authenticate) into that on per-user basis.

Mostly universities had hosting setup the same way. ISPs would also offer a similar thing with an additional fee to your internet-subscription. They mostly provided FTP to upload files. Nowadays if anyone tries to, it will be a SFTP rather than FTP.