I have several applications (Trac and Subversion over WebDav) installed on my Apache server that use the same .httpasswd file to authenticate users. I would like to also install Drupal 6.x but I don't want to use the normal Drupal authentication. I would like Drupal to authenticate users against the .httpasswd file. Is this possible with the webserver_auth module?

Thanks

Comments

Paul Natsuo Kishimoto’s picture

Assigned: Unassigned » Paul Natsuo Kishimoto

Yes, I believe so. The process you are looking for is called "Basic Authentication." Please read this Apache HOWTO and the documentation for the related modules mod_auth and mod_access.

You will need to use .htaccess, httpd.conf or a per-site httpd.conf include (e.g. on Debian systems) to turn on Basic Auth for the directory containing your Drupal installation. If you can get a password prompt to appear in your browser and successfully log in, then Apache/PHP should automatically create the variables that webserver_auth needs to function properly.

If you figure it out, please mark this support request "fixed." If not, I can help you with configuring with webserver_auth, but for the basic Apache configuration I will probably tell you to "RTFM" (that's what I do!).

stodge’s picture

Status: Active » Fixed

Thanks I have it working now.

stodge’s picture

Sorry, one more question. I want to let anonymous users browse the site, but only authenticated users (using the .httpaswd) can edit or post new content. Is this possible using webserve_auth? Thanks

Paul Natsuo Kishimoto’s picture

Yes, I believe so. If you look at some of the other issues/support requests related to this module, some people are bouncing users who want to log in past a Basic Auth-protected page. That causes webserver_auth to log them in; they then remain logged in until they hit a logout link. Users who wish to remain anonymous simply aren't redirected through that protected page.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.