You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Sheldon Ross <sr...@simmgene.com> on 2009/01/19 22:58:53 UTC
[users@httpd] Location based auth
I can't seem to find information on using password authentication within
a <Location> tag.
I've used .htaccess files in directories, but I'm using mod_jk to
connect to tomcat and a status worker, and would like to restrict access
to the status worker. There is no directory to put .htaccess in so how
would I accomplish this?
I tried putting
AuthType Basic
AuthName "Private Area"
AuthUserFile /etc/apache2/htusers
Require valid-user
in the location tag, but it never prompts for user and password it just
says forbidden.
Thanks
Sheldon
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Location based auth
Posted by André Warnier <aw...@ice-sa.com>.
Brian Mearns wrote:
> On Mon, Jan 19, 2009 at 4:58 PM, Sheldon Ross <sr...@simmgene.com> wrote:
>> I can't seem to find information on using password authentication within
>> a <Location> tag.
Try this instead of your JkMount :
<Location /what_needs_to_go_tomcat>
setHandler jakarta-servlet
Auth..
</Location>
The above does the same as
JkMount /what_needs.....
but gives you more flexibility.
It's on the Connectors page in the Tomcat docs, but at the very end of one.
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Location based auth
Posted by Brian Mearns <me...@gmail.com>.
On Mon, Jan 19, 2009 at 4:58 PM, Sheldon Ross <sr...@simmgene.com> wrote:
> I can't seem to find information on using password authentication within
> a <Location> tag.
>
> I've used .htaccess files in directories, but I'm using mod_jk to
> connect to tomcat and a status worker, and would like to restrict access
> to the status worker. There is no directory to put .htaccess in so how
> would I accomplish this?
>
> I tried putting
> AuthType Basic
> AuthName "Private Area"
> AuthUserFile /etc/apache2/htusers
> Require valid-user
> in the location tag, but it never prompts for user and password it just
> says forbidden.
>
> Thanks
>
> Sheldon
Your basic idea is correct, but you're probably missing something
simple. To start, try adding the "Satisfy All" inside the location
tag. If anything "above" the location has granted access without the
password, and you have "Satisfy Any" hanging around, then it will let
them in.
Hope that helps,
-Brian
--
Feel free to contact me using PGP Encryption:
Key Id: 0x3AA70848
Available from: http://pgp.mit.edu/
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org