![]() Marketplace:
|
Password Protect Web Files
You can do this either on a per directory basis in
/etc/apache/httpd.conf or through the use of a
.htaccess file in the directory containing the files to
protect. The following is either added to a
Then create the password file:
You will be prompted for a password. This stores the encrypted
password in the file .htpasswd (the Note that you should take precautions to protect the actual encrypted passwords if you copy them from the shadow file (otherwise they may be subject to attempts to crack them). For example:
I would like to figure out a way to use the system passwords file without making /etc/shadow accessible to everyone (which is precisely the point of the shadow file) and without having to copy the encrypted passwords into .htpasswd. Then I would define the particular user group (AuthGroupFile) as the users who can actually access the relevent web pages. Protecting a cgi-bin directory through the use of the .htaccess file make sure you have in /etc/apache-ssl/httpd.conf:
Normally this is set to
|
Marketplace: |
||||||||
| Facts: " How the mind works is still a mystery. We understand the hardware, but we don't have a clue about the operating system. " | ||||||||||
Tuesday 7 February 2012 18:28:32 1328639312