Questions tagged [htpasswd]
64 questions
2
votes
1 answer
Multiple authentication backends in lighttpd
I have some users in a LDAP directory and I'd like to have another user in a plain or htpasswd file that can login although the connection with the LDAP server is not available.
Is it possible to have multiple authentication backends for the same…

Jaime Soriano
- 308
- 3
- 15
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
1 answer
Need a .htaccess reroute exception when dealing with authentication in a child directory
# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress
I added authentication to a directory "/pb"…

Brandon G
- 153
- 5
2
votes
1 answer
How to set htpasswd for all except LAN?
How can I set htpasswd prompt for everyone who want to access some server except people from LAN (192.168.0.*) ?
Thanks for the answers !

hsz
- 259
- 2
- 7
2
votes
2 answers
generate apache compatible password with mysql
I am currently in the process of migrating an old webserver.
The old server uses basic auth with users stored in a mysql table and mod_auth_mysql enabled.
The password ist stored with apaches build in sha1 function SELECT sha1('secret') which works…

Jürgen Steinblock
- 316
- 1
- 4
- 16
1
vote
0 answers
One Htpasswd For Multiple Vhosts (Apache)
I have multiple vhosts in my httpd.conf like this:
ServerName example.com
DocumentRoot "/var/www/html/wordpress"
AuthName "Just What Do Youuu Think You're Doing?"
…

Summer Developer
- 160
- 1
- 13
1
vote
0 answers
Apache and htpasswd getting errors from random number generator
Recently (probably after yum update something), one of my CentOS7 server running Apache2.4.37 has started to produce the following errors.
apachectl configtest
(38)Function not implemented: AH00141: Could not initialize random number…

mmrn
- 121
- 4
1
vote
0 answers
.httpasswd doesn't work breaks Yii .htaccess Rewrite Rules
I have a standard .htaccess for Yii 1.1, to which I added http based authorization.
When I added the password protection, the Rewrite Condition RewriteCond %{REQUEST_FILENAME} !-f stopped working, and now static file requests are processed through…

Petruza
- 285
- 3
- 9
1
vote
1 answer
Nginx Password Protect Directory Downloads Source Code
I'm trying to password protect a WordPress login page on my Nginx server. When I navigate to http://www.example.com/wp-login.php, this brings up the "Authentication Required" prompt (not the WordPress login page) for a username and password.…

Pamela
- 187
- 2
- 13
1
vote
1 answer
htpasswd - Any tip to block brute force attacks?
Update: As Craig suggested I'm trying fail2ban now. Even though I have issues in that as well.
failregex is not finding any result though. I had enabled all apache* in jail.local and here is how my apache logs errors:
[Fri Jul 25…

Matt
- 11
- 1
- 2
- 5
1
vote
0 answers
lighttpd access control affecting subdirectory trees sibling to a htpasswd file
Suppose I have a htdocs directory tree served by lighttpd
htdocs
htdocs/foo
htdocs/foo/spam
htdocs/foo/eggs
htdocs/foo/eggs/stirred
htdocs/foo/eggs/fried
htdocs/bar
htdocs/bar/bacon
Now I'd like to protect individual subtrees depending on, if…

datenwolf
- 289
- 1
- 11
1
vote
1 answer
nginx http auth only working on folders, not on files
I am new to nginx and I really enjoy how fast it is in combination with php-fpm.
I want to protect a folder with
location / {
try_files $uri $uri/ $uri.php /;
auth_basic "restricted";
auth_basic_user_file…

Daniel W.
- 1,609
- 4
- 26
- 48
1
vote
1 answer
configure nginx to use an optional .htpasswd
Hello Serverfault members.
I want my NginX to use an optional .htpasswd file.
The reason is, that my config dynamically serves the webcontent. Based on $http_host.
So I've tried the following:
if (-f "/foo/$http_host/.htpasswd") {
auth_basic…

McFarlane
- 113
- 4
1
vote
1 answer
How to generate a Linux Apache password file on a PC running Windows 7?
My development machine is Windows. I use the htpasswd program that is part of the Windows XAMPP package, version 1.7.7, to generate a Windows Apache password file.
C:\xampp\apache\bin\htpasswd.exe -bc .htpasswd usename password
I need to generate…

Ian
- 261
- 1
- 2
- 11
1
vote
1 answer
.htaccess password protection not working in localhost
I tried to implement htaccess password protection for a directory in my localhost.
My htaccess file is situated in /home/Server/Dev. The directory I want to protect is /Dev/. My .htaccess file has the following contents:-
AuthName "Restricted Area"…

Sparky
- 213
- 2
- 6
- 12