Password file format used on Apache web servers
Questions tagged [.htpasswd]
48 questions
11
votes
2 answers
Apache .htaccess error: 'not allowed here' on Debian Wheezy
I am trying to configure an apache virtualhost which needs to be password protected in the root directory.
So I created a .htpasswd file (with sha passwords) and configured the .htaccess file. Howevery whatever I do, on the webpage I get an error…

BonifatiusK
- 243
- 1
- 4
- 12
8
votes
2 answers
Invalid command 'AuthType', perhaps misspelled or defined by a module not included in the server configuration
I'm trying to password protect the document root and all I get is an "internal server error" page. The Apache error log shows:
Invalid command 'AuthType', perhaps misspelled or defined by a module not included in the server configuration
My…

Dean Or
- 213
- 1
- 2
- 5
8
votes
1 answer
What kind of algorithm does .htpasswd uses?
I am trying to generate this kind of hashes programmatically:
axF3s9cdEnsNP
But I can't identify what kind of hash it is. The hash comes from a .htpasswd file.
All the online htpasswd generators I tried generates different type of hashes.

trevhas
- 83
- 1
- 3
6
votes
4 answers
How to create and edit .htaccess and .htpasswd locally on my computer and then upload to my site via ftp?
I'm making a website for a client, and I want to make a password protected directory. The problem is my account type only allows FTP, so is there any way to create the .htaccess and .htpasswd files locally on my computer so I can upload them via…

cstack
- 163
- 1
- 2
- 7
5
votes
3 answers
Permission denied: Could not open password file.
I am using Apache Red hat .
I have .htaccess in my /var/www/html with permissions as followed
-rwxr-xr-x. 1 apache apache 127 Dec 18 14:17 .htaccess
.htaccess has following data set inside it
AuthType Basic
AuthName "Restricted…

user1486269
- 53
- 1
- 1
- 4
4
votes
1 answer
force https with apache before .htpasswd
I have this in my .htaccess file
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://www.myweb.com/phpmyadmin$1 [R,L]
AuthUserFile /var/www/myweb/.htpasswd
AuthGroupFile /dev/null
AuthName "Sovereign Databases"
AuthType…

John
- 7,343
- 23
- 63
- 87
3
votes
3 answers
Password protect directory with Apache: "couldn't check user. Check your authn provider!"
I am trying to password protect a web directory with apache. I have the site set up like this:
D:/
webapp/
lib/
.htpasswd
document_root/
admin/
index.php
.htaccess
The .htaccess has:
AuthName…

Explosion Pills
- 221
- 1
- 2
- 10
3
votes
1 answer
Why is my .htaccess and .htpasswd not working?
I have .htaccess and .htpasswd files in the directory that has png files that I want to protect.
.htaccess
AuthType Basic
AuthName "Co to za nielegalne grzebanie w plikach, juz dzwonie na milicje."
AuthUserFile ./.htpasswd
Require…

Wungiel
- 31
- 2
2
votes
2 answers
HTTP .htpasswd protect sub-domain on Nginx recursively
I want to password protect my developer subdomain (dev.example.com), and leave the main domain publicly available.
I want to do this recursively, so that any file or folder on the subdomain will always prompt you for a login.
In the Nginx config…

Trace DeCoy
- 153
- 2
- 6
2
votes
1 answer
Apache server password file (htpasswd) encoding
I use .htaccess, basic authentication and a corresponding password file to secure my web-space. The hosting is Linux / Apache.
I want to support a user name with French accents (ie. not ASCII).
Are non-ASCII user names supported?
What encoding…

Philipp
- 505
- 1
- 5
- 13
2
votes
2 answers
How can I make Jenkins inaccessible to the outside world?
On a development server, I have installed the tool Jenkins for automated testing. This runs on port 8080. If I go to www.mysite.com:8080 I can see the command panel for this. I want to make this inaccessible to the outside world by password…

celenius
- 273
- 1
- 4
- 17
2
votes
0 answers
(WordPress) .htaccess redirecting actual subfolder location
I have WordPress setup in root, but I have a sub-folder that is not related to WordPress as well. I just moved servers, so before if I went to .com/admin/ I would get that subfolder. Now, I (and others) get redirected to .com/wp-admin/ (or asked to…

MECU
- 121
- 4
2
votes
2 answers
Apache basic HTTP authentication not working
Trying to setup basic HTTP authentication with Apache, but it's not working. I get the directory listing and files regularly, no authentication required. I tried restarting httpd and the browsers cache.
I can't find any relevant entries in…

johndir
- 305
- 1
- 5
- 9
2
votes
1 answer
Apache htaccess passwd - ignoring correct login
I want to password protect a directory. I'm running Apache 2 with cPanel on Centos.
For the sake of this post, the directory is /home/user/my-secret-dir
I used cPanel's "Password Protect Directories" to create the login details, which it stored in a…

Peter Boughton
- 594
- 2
- 7
- 19
2
votes
2 answers
Apache authentication inside a WordPress install
I am currently running into an issue with trying to password protect a directory that is sitting inside a directory that's running WordPress. This is for a directory called "admin" that handles a few things outside of WP.
In my WordPress .htaccess…

Charles Chadwick
- 73
- 1
- 6