View previous topic :: View next topic |
Author |
Message |
-Craig- Guru
Joined: 03 Jun 2004 Posts: 333
|
Posted: Tue Feb 26, 2008 11:00 am Post subject: Apache directory protection |
|
|
Hi,
I want to allow Users to request /f00/bar.do without passwort, but the rest of /f00 should be protected via passwort+ip protection.
Is this possible? I cannot use <Directory> as the bar.do comes from a tomcat server.
For some reason this does not work here:
Code: | <Location ^/f00/bar.do>
order allow,deny
allow from all
Satisfy any
</Location>
<LocationMatch "/f00">
AuthType Basic
AuthName "f00auth"
AuthUserFile /etc/apache2/htpasswd
require user bar
order deny,allow
deny from all
allow from X.X.X.X
Satisfy all
</LocationMatch> |
Last edited by -Craig- on Thu Feb 28, 2008 10:23 am; edited 1 time in total |
|
Back to top |
|
|
coolsnowmen Veteran
Joined: 30 Jun 2004 Posts: 1479 Location: No.VA
|
Posted: Thu Feb 28, 2008 2:45 am Post subject: |
|
|
I've definitely done things like that,
you might you need to change the order though....
A little different, but this worked for me
<Directory /var/www/protected_stuff>
UseCanonicalName Off
AuthType Basic
AuthName "Password Required"
AuthUserFile /password.file
AuthGroupFile /group.file
Require group special_people
</Directory>
<Location /protected_stuff/test>
order allow,deny
allow from all
Satisfy any
</Location> _________________ emerge: there are no ebuilds to satisfy "moo" |
|
Back to top |
|
|
-Craig- Guru
Joined: 03 Jun 2004 Posts: 333
|
Posted: Thu Feb 28, 2008 10:24 am Post subject: Re: Apache directory protection |
|
|
Thanks, BUT:
-Craig- wrote: | Hi,
I cannot use <Directory> as the bar.do comes from a tomcat server.
|
It does not work with <Location> |
|
Back to top |
|
|
coolsnowmen Veteran
Joined: 30 Jun 2004 Posts: 1479 Location: No.VA
|
Posted: Thu Feb 28, 2008 4:54 pm Post subject: |
|
|
I know, but the directive that specifies the file is not, which did not appear to violate your previous requirement, and I thought changing the order might help, but
Try using the <Files>
http://httpd.apache.org/docs/2.0/mod/core.html#files
note they can be nested. _________________ emerge: there are no ebuilds to satisfy "moo" |
|
Back to top |
|
|
-Craig- Guru
Joined: 03 Jun 2004 Posts: 333
|
Posted: Fri Feb 29, 2008 9:48 am Post subject: |
|
|
No, doesn't work. |
|
Back to top |
|
|
|