In Apache2, I created an authenticated folder, made correctly with the following entry in my configuration file:
<Directory "/var/www/html/private">
AuthType Basic
AuthName "Restricted Content"
AuthUserFile /etc/apache2/.htpasswd
Require valid-user
</Directory>
Currently, when I try to navigate to a file I know is in that protected folder via a web browser, I get the prompt to enter my username and password, which is what I want to happen. However, when I go to anyone of my HTML files on my website (such as one in my HTML folder directly or another directory) that refers to javascript contained in that private folder, it also prompts me for a username and password, which is not what I want. How can I fix this?