If you want to activate UserDir attribute in xampp, you have to uncomment following line in
/opt/lampp/etc/httpd.conf
Code:
Include etc/extra/httpd-userdir.conf
Now open the file
/opt/lampp/etc/extra/httpd-userdir.conf and uncomment these two lines and change
UserDir disabled to
UserDir enabled
Code:
UserDir enabled
UserDir public_html
The second line says public_html directory is now htdocs directory for users. It's path has been given in the same file.
Code:
<Directory "/home/*/public_html">
All new users are created in /home.
Now you can access per user web directories using
Code:
http://localhost/~username1
http://localhost/~username2
http://localhost/~username3
etc
Now here you were facing Access Forbidden Error when you were accessing these links.
Because there wass an Directory attribute in
/opt/lampp/etc/httpd.conf
Code:
<Directory />
AllowOverride none
Require all denied
</Directory>
it says
AllowOverride none &
Require all denied
Just comment these four lines
Code:
#<Directory />
# AllowOverride none
# Require all denied
#</Directory>
and restart xampp using
Code:
# /opt/lampp/lampp start
Now try to open
http://localhost/~username1
You will not get access forbidden error.
Note : If you make any type of changes in conf file of xampp, Restart xampp once to see the changes.