Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

Thanks

share|improve this question

1 Answer 1

up vote 0 down vote accepted

If you're content to have the user's web site be www.example.com/~username, 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

 
discard

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.