Forum: Ruby on Rails Protecting a Mongrel site with Apache htauth

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
21053fc472ce35063e175e9cfbb78e6b?d=identicon&s=25 Gareth Adams (Guest)
on 2007-05-24 17:02
(Received via mailing list)

We have a mongrel site running behind Apache using ProxyBalancer to
manage our
cluster. We would like to use HTTP Authentication to restrict access to
site, but Apache's mod_auth only protects a directory - this is a
because ProxyBalancer siphons off all the Rails requests before mod_auth
has a
chance to kick in.

Is it possible to restrict access to the site with our current setup?

4520e34a40d28b21408e61e212e2a0e3?d=identicon&s=25 Paul Wright (Guest)
on 2007-05-25 18:46
(Received via mailing list)
Is it not possible to have a Location directive instead of Directory
to apply auth to all requests?  A while ago I got something like the
following working:

<Location / >
 AllowOverride None
 AuthName "My Rails App"
 AuthType Basic
 AuthUserFile "/path/to/file"

 <Limit GET POST>
   require valid-user

This topic is locked and can not be replied to.