| 1 |
// $Id$
|
| 2 |
|
| 3 |
INSTALLATION
|
| 4 |
------------
|
| 5 |
|
| 6 |
1) Copy the httpauth directory into the appropriate modules directory in your
|
| 7 |
Drupal installation (recommended: sites/all/modules).
|
| 8 |
|
| 9 |
2) Go to Administer > Site building > Modules and enable the HTTP
|
| 10 |
authentication module.
|
| 11 |
|
| 12 |
3) If you know you are not using PHP in CGI or FastCGI mode, you can continue
|
| 13 |
with step 4.
|
| 14 |
|
| 15 |
a. To check what mode your PHP is running in, go to Administer >
|
| 16 |
Reports > Status report, click the PHP version number, and find the
|
| 17 |
Server API row. If this says something like "CGI" or "FastCGI", you
|
| 18 |
are running PHP in CGI mode. If you are not, continue with step 4.
|
| 19 |
|
| 20 |
b. In order to make HTTP authentication work when using PHP in CGI mode,
|
| 21 |
you will need to add the following lines to the .htaccess file
|
| 22 |
located in your Drupal root directory, just below the line that says
|
| 23 |
"RewriteEngine On":
|
| 24 |
|
| 25 |
RewriteCond %{HTTP:Authorization} ^Basic
|
| 26 |
RewriteCond %{QUERY_STRING} !HTTP_AUTHORIZATION
|
| 27 |
RewriteRule ^(.*)$ $1?HTTP_AUTHORIZATION=%{HTTP:Authorization} [L,QSA]
|
| 28 |
|
| 29 |
4) Go to Administer > Site configuration > HTTP authentication and enable
|
| 30 |
HTTP authentication to start using the module.
|