Allow access to one file

This is a discussion on Allow access to one file within the Apache Web Server forums, part of the Web Server and Related Forums category; Hello all, I have site whose docroot is protected by LDAP authentication. In the docroot i have one file, "...


Go Back   Usenet Forums > Web Server and Related Forums > Apache Web Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-11-2008
beef
 
Posts: n/a
Default Allow access to one file

Hello all,

I have site whose docroot is protected by LDAP authentication.

In the docroot i have one file, "xml.php" that I need to exclude from
this authentication.

I have been mucking around with <Files>, <FilesMatch>, etc. wiht no
success.

Here's my .htaccess in the docroot, but I *do* have access to
httpd.conf if needed:

>>>>>>>>>>>>>>>>>>>>>>>>>>

AuthType Basic
AuthName "Protected Content"
AuthBasicProvider "ldap"
AuthLDAPURL "ldap://LDAP-HOST:PORT/DC=example,DC=com?uid?
sub?(objectClass=user)"
AuthLDAPBindDN ldap-search@example.com
AuthLDAPBindPassword "p@55ww0rd"
authzldapauthoritative Off
require valid-user

<FilesMatch "^xml\.php">
Allow from all
</FilesMatch>
>>>>>>>>>>>>>>>>>>>>>>>>>>


A little help? Anyone?



  #2 (permalink)  
Old 04-12-2008
D. Stussy
 
Posts: n/a
Default Re: Allow access to one file

"beef" <winterbeef@gmail.com> wrote in message
news:3def6062-2257-4db2-93b9-3252aad58e87@59g2000hsb.googlegroups.com...
> Hello all,
>
> I have site whose docroot is protected by LDAP authentication.
>
> In the docroot i have one file, "xml.php" that I need to exclude from
> this authentication.
>
> I have been mucking around with <Files>, <FilesMatch>, etc. wiht no
> success.
>
> Here's my .htaccess in the docroot, but I *do* have access to
> httpd.conf if needed:
>
> >>>>>>>>>>>>>>>>>>>>>>>>>>

> AuthType Basic
> AuthName "Protected Content"
> AuthBasicProvider "ldap"
> AuthLDAPURL "ldap://LDAP-HOST:PORT/DC=example,DC=com?uid?
> sub?(objectClass=user)"
> AuthLDAPBindDN ldap-search@example.com
> AuthLDAPBindPassword "p@55ww0rd"
> authzldapauthoritative Off
> require valid-user
>
> <FilesMatch "^xml\.php">
> Allow from all
> </FilesMatch>
> >>>>>>>>>>>>>>>>>>>>>>>>>>

>
> A little help? Anyone?


Rearrange your directory/virtual host.
.... Allow from all
<FilesMatch "!^xml\.php">
AuthType, etc.
</FilesMatch>

The problem with your configuration is that the authorization applies to
everything in that directory/virtual host.


  #3 (permalink)  
Old 04-14-2008
beef
 
Posts: n/a
Default Re: Allow access to one file

> Rearrange your directory/virtual host.
> ... Allow from all
> <FilesMatch "!^xml\.php">
> AuthType, etc.
> </FilesMatch>
>
> The problem with your configuration is that the authorization applies to
> everything in that directory/virtual host.


Thanks! I tried this, but while it doesn't error, apache now does not
prompt for ANY files...

It almost seems like the bang is being interpreted as part of the
pattern, and not as logical inversion. I have not seen this syntax,
nor have been able to find any docs on it...

pointers?




 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 09:48 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0