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, "...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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? |
|
|||
|
"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. |
|
|||
|
> 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? |