How To Protect a Single File in Apache
![Calendar](https://www.ericmichaelstone.com/wp-content/themes/me3/images/calendar.png)
In order to protect a file, just replace the Directory directive with Files:
1 2 3 4 5 6 |
<Files wp-login.php> AuthType Basic AuthName "Protected Access" AuthUserFile /var/www/yourname/.htpasswd Require valid-user </Files> |