For example, user with username ahmad, can have his own Web site at
http://localhost/~ahmad
Enable mod_userdir
To achieve that, first, what you need to do is to enable mod_userdir, which is installed by default with Apache2.sudo a2enmod userdir
Create public_html directory
Second, the user need to create public_html directory in their home directory.mkdir public_html
Restart Apache
Finall, you should restart Apache.sudo /etc/init.d/apache2 restart