Quantcast
Channel: Active questions tagged password - Ask Ubuntu
Viewing all articles
Browse latest Browse all 333

Password protect directory listing only and not the files themselves

$
0
0

I have in my /home/sammy/public_html/cache/.htaccess

Options +Indexes<Files *>AuthType BasicAuthName "Authentication Required"AuthUserFile /home/sammy/public_html/cache/.htpasswdRequire valid-user</Files>

But I only want the directory listing password protected - not the file itself.

Issue is, when I go to example.test/cache/somefile.pdf it’s prompting for the username and password.


Viewing all articles
Browse latest Browse all 333

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>