Questions tagged [.htpasswd]

.htpasswd is a flat-file used to store usernames and password for basic authentication of Apache HTTP Server.

.htpasswd is a flat-file used to store usernames and passwords for basic authentication on Apache HTTP Servers. The name of the file is given in the .htaccess configuration, and can be anything, but ".htpasswd" is the canonical name. The file name starts with a dot, because most Unix-like operating systems consider any file that begins with dot to be hidden.

This file is often maintained with the shell command htpasswd which can add, delete, and update users, and will properly encode the passwords for use (so they are easily checked, but cannot be reversed back to the original password).

The file consists of rows. Each row corresponds to a username and hashed password pair, separated with the colon. For example:

user:password

The hashed password is typically "UNIX crypt" style, encrypted in either MD5 or SHA1 as common alternatives.

Additional users can be added by using the htpasswd shell command or by appending new lines to the file. For example:

user1:password1
user2:password2

Resources available on the Apache HTTP server can be restricted to users listed in the files created by htpasswd.

See also

526 questions
0
votes
1 answer

.htaccess, .htpasswd across Multiple Joomla instances

I maintain several instances of Joomla on my hosting account mostly 2.5 installations, but some 1.5 installs. Is it possible to use one .htaccess file in the root for all instances. What would i need to modify to make this happen? O I would like…
TEN Design
  • 717
  • 3
  • 13
  • 31
0
votes
1 answer

Login with htaccess + welcome message with php

I have a htaccess and htpasswd file. I want that if e.g.: user1 logs in give a message that Welcome 'user1'! My main problem is that I don't know how to tell to the php file that user1 is logged in ...
Phoenixy
  • 104
  • 1
  • 14
0
votes
1 answer

Wordpress RewriteRule Conflicts with .passwd

In my root .htaccess file I have the following Wordpress code: RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /wordpress/index.php [L] Slightly different to the standard code…
Andrew
  • 3,335
  • 5
  • 36
  • 45
0
votes
1 answer

Htaccess/Htpasswd AutoType Basic Doesn't Work in Chrome

Okay, so I'm protecting a webpage with a basic .htaccess/.htpasswd combination. My .htaccess file looks something like this: DirectoryIndex index.php AuthUserFile HOMEDIRECTORY/.htpasswd AuthName "Restricted Area" AuthType Basic require…
Edge
  • 2,456
  • 6
  • 32
  • 57
0
votes
2 answers

Directory authentication not working

This is my htaccess file in the directory /home/domain.nl/public_html/helpdesk Require user agent8 agent9 agent10 AuthType Basic AuthName this_protected_area AuthUserFile /home/domain.nl/public_html/.htpasswd But when I go to…
Jochem Gruter
  • 2,813
  • 5
  • 21
  • 43
0
votes
1 answer

Authenticate Subdirectories

Here's a picture of a folder inside the root directory my website: I want to have htaccess require an authentication to access any of these folders. So no one can type in www.domain.com/Folder/CSS and access it without the correct username and…
Charlie Yabben
  • 307
  • 2
  • 7
  • 13
0
votes
4 answers

Password Protecting Web Directories and Files

A user enters my website and arrives at the home page, he/she should always and only be at home page. All other files are scripts that are run by the homepage but the user should never navigate to them. So here's my directory layout: They will…
Charlie Yabben
  • 307
  • 2
  • 7
  • 13
0
votes
2 answers

Trouble with .htpasswd login screen not being displayed

I am trying to setup a password protected directory on my localhost. The .htaccess file is located in /var/www/project/code/server/development and the .htpasswd file is located in the /home/adarshakb/.htpasswd The .htaccess file contains: AuthType…
footy
  • 5,803
  • 13
  • 48
  • 96
0
votes
1 answer

URL rewriting with a password protected subfolder (in a joomla site)

I have a Joomla 2.5 site set up, and SEO turned on, and "activated" the .htaccess file. Now the problem is i have a folder which is a special admin site, where some other settings are set and a lot of other stuff, and this folder i can not password…
Dan Mikkelsen
  • 286
  • 4
  • 13
0
votes
1 answer

Apache2: Password protected directory - website cannot connect to its own server

I have protected a directory where my website is placed with password (.htaccess + .htpasswd). The protection works like a charm. However, there is one problem. On the same domain I have SOLR server set up and my website uses remote connections to…
Jacek Francuz
  • 2,420
  • 8
  • 45
  • 61
0
votes
1 answer

.htaccess & .htpasswd equals 500 error

I+m trying make a folder on my server protected by .htaccess & .htpasswd. When I try to enter the folder in question I'm asked for a password like I want. But then when the page is loaded I get a 500 error, which also happens on all pages on my site…
just_user
  • 11,769
  • 19
  • 90
  • 135
0
votes
2 answers

Directory protected with .htaccess and WordPress

I have a standard WordPress installation at the root of my public_html directory with this .htaccess: # BEGIN WordPress RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME}…
0
votes
1 answer

htaccess does not require login when using POST

I'm new to this so I'm hoping that this is just a issue of me not editing a config file properly. I have a protected directory in my cgi-bin called /auth. The auth directory has an .htaccess file in it. First I made the htpasswd file as…
b10hazard
  • 7,399
  • 11
  • 40
  • 53
0
votes
1 answer

How to generate the .htpasswd with MD5 encryption with ANT?

I'm programming a ant task whitch create folders on a FTP linux based server, and i would like to make it generate the .htaccess file and the .htpasswd file. I need to write passwords in the .htpasswd with the MD5 encryption (or other encryption…
0
votes
2 answers

URL rewriting and htpasswd

I'm using URL rewriting on my website and i would like to add an authentication via .htpasswd file to one of my directory. My website is build like…
Natha
  • 55
  • 5