Posts tagged apache
Enable .htaccess authentication using Apache?
Dec 4th
Enabling password authentication on Windows using Apache (link if you wish to RTFM) isn’t too much of a chore if you have basic knowledge of some simple coding and apache configuration.
A couple things to jot down:
- Path to your Apache server (e.g., c:\apache)
- Path to your CONF folder (e.g., c:\apache\conf)
- Path to your DOCROOT folder (e.g., c:\apache\htdocs)
- Path to the folder you wish to password-protect. In myexample, lets take a
folder called “secure”, so the path to thiswould be
“c:\apache\htdocs\secure”. (It could be ABOVE the htdocsfolder as
well, FYI).
Ok, what to do:
- Open up your httpd.conf. (On my machine this is at
“c:\apache\conf\httpd.conf”). - Look for the word AllowOverride, and change it from None to All.
- Our httpd.conf is done. Now we need to create the password
file. Open up a DOS prompt and go to the apache’s BIN directory. In
my case, it is “c:\apache\bin”. - Now, we need to create the .HTACCESS file itself.
- Restart Apache – This is what happens when accessing your secret area!










