Re: Ideas for password-protecting live site
Keith Fetterman <[email protected]> Tue, 09 May 2006 08:31:06 -0700
| Newsgroups | gmane.text.xml.resin.user |
|---|---|
| Organization | Mariner Supply, Inc. |
| Message-ID | <[email protected]> |
Instead of "<Directory /u/www/htdocs/>", use <Location>. For example:
# Limit access to the main site
#
<Location />
AllowOverride AuthConfig
AuthName "Test Web Site"
AuthType Basic
AuthUserFile /web/etc/htpasswd
AuthGroupFile /web/etc/htgroup
Require group webtest
Order allow,deny
Allow from 127.0.0.1
Allow from 10.0
Allow from 192.168.1
Satisfy any
</Location>
The "Allow from 10.0" entries allow users on the internal subnet to
access the Website without being prompted for a username/password
Eric Carlson wrote:
> On Tue, 9 May 2006 10:12:32 +0100, you wrote:
>
>>> it too much just to deny unauthorised access means it isn't ;-) What I
>>> really want is the functionality I'd get by dropping a .htaccess file
>>> in my root dir, running mod_caucho & apache, and having apache pop up
>>> its password box once first, then the site appears as normal. I tried
>>> this and apache just ignored it (because jsp's bypass it?). Anyway,
>>> this and other ideas very welcome for what must be a common situation
>>> please. Thanks.
>> In your apache config, use a <Location> tag to define the URL as password protected or alternatively a <Directory> tag to define the protection of the root directory:
>
> I tried that and it didn't work - its really the same as dropping in a
> .htaccess file. The odd thing is this has worked in the past, so its
> either my config or a bug. I'm on resin 3.0.14 pro - what version is
> yours please?
>
--
-----------------------------------------------------------------
Keith Fetterman 206-780-5670
Mariner Supply, Inc. [email protected]
http://www.go2marine.com