User Directory at Apache2 - Debian

Have you seen URL like this
http://domain-name.com/~user
We can make that url in our localhost by activating the userdir mod at apache2

Open terminal, get into your root account, type this:

debian:~# ln -s /etc/apache2/mods-available/userdir.conf /etc/apache2/mods-enabled/
debian:~# ln -s /etc/apache2/mods-available/userdir.load /etc/apache2/mods-enabled/
It will be activating the userdir mod.


then.., we need to make public_html directory at /etc/skel, to make public_html template for every new user in this box..
debian:~# mkdir /etc/skel/public_html/
Lets create a new account..
debian:~# adduser spydeeyk
Adding user `spydeeyk' ...
Adding new group `spydeeyk' (1002) ...
Adding new user `spydeeyk' (1002) with group `spydeeyk' ...
Creating home directory `/home/spydeeyk' ...
Copying files from `/etc/skel' ...
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Changing the user information for spydeeyk
Enter the new value, or press ENTER for the default
Full Name []:
Room Number []:
Work Phone []:
Home Phone []:
Other []:
Is the information correct? [y/N] y
debian:~#
Now open your browser.., lets check if its work..


0 comments:

Post a Comment