Apache .htaccess directory access protection - LinuxConfig.org

When running an Apache web server on a Linux system, there may be some directories that you don't want everyone in the world to be able to access. Apache gives us a couple of different tools that website administrators can use to protect a directory.

One of the most common ways to configure restricted access to a folder is through the .htaccess file. Doing this configuration will prompt users for a password whenever they come across the protected URL.


This is a companion discussion topic for the original entry at https://linuxconfig.org/apache-htaccess-directory-access-protection