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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 02-26-2004 #1
- Join Date
- Jan 2004
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 #2
- Join Date
- Apr 2003
- London, UK
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:
<IfModule mod_userdir.c> UserDir public_html </IfModule>