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?
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.