Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have just installed CentOS to use as a server and installed Apache.

I have noticed that the web root is: /var/www/html

But I'd like to install an FTP server, which will lock users into their own /home/username, which will have a public_html folder that will then be that particular users web root, rather than /var/www/html/username

What is the easiest way to achieve this?


share|improve this question
up vote 0 down vote accepted

If you're content to have the user's web site be, then you can simply use the apache module mod_userdir. If you'd like each user to have their own domain name, you'd need to utilized name-based virtual hosts with each vhost's docroot defined as the user's home directory.

share|improve this answer
Well I'd rather have each /home/username as a different domain without the ~/usernameand they can only access that particular folder. Will I need to use name-based vhosts and an FTP server to achieve this? – terrid25 Aug 31 '11 at 12:32
Yes. Take a look at vsftpd's chroot_local_user directive to accomplish the FTP portion of your requirement. – JakePaulus Aug 31 '11 at 12:40
Thanks for that! I'll have a look – terrid25 Aug 31 '11 at 12:58

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.