Ubuntu: XAMPP on Ubuntu Securing Directory Issue


I am making a directory on a ubuntu server using XAMPP. I am trying to secure the directory with a password and have had no success: I tried running this command:

sudo htpasswd -c/opt/lampp/htdocs/[myreponame]/.htpasswd username   

then i go through with entering the password. After that i've ran

sudo /opt/lampp/lampp   

restart to restart and then try loading the page and it does not ask for the password. I've also tried doing similar command:

sudo htpasswd -c /opt/lampp/etc/xampp/.htpasswd [username]   

then enter the password restart services as shown above. When i do it this was it still does the same thing loads the page without asking for a password. I try accessing it by


any ideas or suggestions. I've spent a good few too many hours on it. I want to secure this properly since security is very important.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »