Skip to main content

Posts

Showing posts with the label Password Protected

Set Apache Password Protected Directories With .htaccess File

Q. How do I protecting a directory in Apache on linux? A. There are many ways you can password protect directories under Apache web server. This is important to keep your file privates from both unauthorized users and search engines (when you do not want to get your data indexed). Here you will see the basics of password protecting a directory on your server. You can use any one of the following method: Putting authentication directives in a <Directory> section, in your main server configuration httpd.conf file, is the preferred way to implement this kind of authentication. If you do not have access to Apache httpd.conf file (for example shared hosting) then with the help of file called .htaccess you can create password protect directories. .htaccess file provide a way to make configuration changes on a per-directory basis. In order to create apache password protected directories you need: Password file And Directory name which you would like to password protect (/v...