VPS multiple users, each user to have a website in their home directory


#1

Hello,

How can I enable users to view their websites on the VPS (without transferring a domain from my Shared account over)?

Read about UserDir here, but don’t know how to implement this in the VPS.

UserDir public_html

the URL http://example.com/~debian/index.html will be translated to the file path /home/debian/public_html/index.html

Sandra Newbie to VPS


#2

We don’t directly support the use of mod_userdir, as it’s largely obsolete nowadays. My recommendation would be to create a subdomain for each user — creating subdomains is free, and will give you far better control over each user’s settings than you would have otherwise, so there’s probably no reason to go down the /~username/ path.

If you must have user directories for some reason, my recommendation would be that you use the panel’s “Remap Subdirectory” functionality to set it up. Be warned that some features — in particular, PHP and CGI scripts — will not work as expected with this configuration, though, since they will always run as the owner of the main domain, rather than as the user that owns the directory. (They will work perfectly with subdomains, which is another reason I’d recommend you do that.)