Results 1 to 2 of 2
i'm running apache webserver on Slack9.1.
www directory is in /var/www/html .
My question is ; i want to set www directories for all users in their home directory, which ...
- 02-26-2004 #1Linux Newbie
- Join Date
- Jan 2004
- Location
- Istanbul,Turkey
- Posts
- 151
web host for all users
i'm running apache webserver on Slack9.1.
www directory is in /var/www/html .
My question is ; i want to set www directories for all users in their home directory, which can be called by typing localhost/~username .
i want this process to be aoutomotic, i.e. when i add a new user to system, the required directories will be created and localhost/~newuser gives a default under constraction page. How can i set this system up?
Thank You!Have a nice day
- 02-26-2004 #2Linux Guru
- Join Date
- Apr 2003
- Location
- London, UK
- Posts
- 3,284
you would need to write your own "adduser" shell script, that does the normal adduser stuff, but additionally creates the ~/public_html/ directory and copies a "template" index.html into it. A bash script would proberly be workable, but im not an expert.
In your httpd.conf of apache, ensure you have a line like:
where "public_html" is the name of the directory that the script as above creates.Code:<IfModule mod_userdir.c> UserDir public_html </IfModule>
Jason


Reply With Quote
