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.

What shall I do if I want to make apache to automatically create ~username subdirectories for each account? I tried to google it but I don't know how to call this...

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

Hey, what you're looking for is mod_userdir.

Enabling it depends on the distribution you're using.

For CentOS Open /etc/httpd/httpd.conf - search for and change:

UserDir disable

To:

UserDir enable

Or, for Ubuntu/Debian:

a2enmod userdir

Afterwards you'll need to restart your webserver, i.e.

service httpd restart

or

service apache2 restart

You are also able to configure what directory is used for userdir (default public_html) by specifying UserDir [name of dir] instead of UserDir enable

share|improve this answer
1  
I just reread your question - this doesn't CREATE the directories, just configures Apache to use them. If you want to create the physical directories you need to either manually do it or script it. You'll need to create a public_html directory in each users home. But I think my original answer is what you wanted anyway! –  Rafiq Maniar Dec 2 '10 at 0:38
    
Thanks! It helped! –  manatails008 Dec 2 '10 at 2:22
add comment

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.