I am new to linux administration and I am trying to restrict the outside world from accessing files in my /var/www folder.
I have done my research and found that .htaccess and .htpasswd was a good solution. So I found this online tutorial here that told me to create the .htaccess file which looks like this
AuthType Basic AuthName "Password Protected Area" AuthUserFile /var/www/.htpasswd Require valid-user
And then it had a password generate on the site so I put my password in and it told me to put this in my .htaccess file (the user is tom and I used X to hide my password)
I now put both files into my /var/www/ directory. However, when I try to access my files via a web browser Ex. XXX.XX.XXX/myfiles/test.... it still allows me access.
What am I doing wrong?