Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Apache: Users

exclude a subdirectory from authentication request

 

 

Apache users RSS feed   Index | Next | Previous | View Threaded


caiuspolgar at yahoo

May 13, 2008, 8:20 AM

Post #1 of 4 (1880 views)
Permalink
exclude a subdirectory from authentication request

im running an apache 2.2.4...
Server version: Apache/2.2.4 (Unix)
Server built: Jul 30 2007 17:04:39

Below is my generic directory configuration
i need some help as im a little lost

i have put something like this in my httpd.conf file to protect all my web directory's with user/pass

<Directory />
AuthType Basic
AuthName "Secure BOX"
AuthzLDAPAuthoritative On
AuthLDAPURL "ldap://localhost:389/ou=People,dc=testbox,dc=com"
Require valid-user
AllowOverride All
</Directory>

And as you know, subsequently all the directories below it are protected as well.
I need to keep this logic intact but UN-password protect a subdirectory "/users/public", so i would like to exclude then from authentication mechanism

I have read that I could just put another .htaccess file in "/users/public" to override the password protection from the httpd.conf file.

#.htaccess
Order Allow,Deny
Satisfy Any
Allow from all

I tried this but it didnt work, meaning that i was still requested for a user/pass

Is there some rules/if statement that i can put? or another method that could work the way i want it?

PS: i have more then 100 directory's and i dont want to put separately in each an authentication block and only in the directory/subdirectory where i want free access no authentication block

Best Regards
Caius

Toate cele bune,
Caius Polgar

#################################################
#Deosebim doua tipuri de pedepse. Cu viata si cu moartea#
####################################[V. Butulescu]#


matt.farey at gmail

May 13, 2008, 11:11 AM

Post #2 of 4 (1865 views)
Permalink
Re: exclude a subdirectory from authentication request [In reply to]

Use another directory stanza in your main httpd.conf which references the subdir you want unprotecting.
Perhaps .htaccess files are off - and with more than 100 directories, you should leave them off, especially if some are nested.


Sent from my BlackBerry® wireless device

-----Original Message-----
From: Caius <caiuspolgar[at]yahoo.com>

Date: Tue, 13 May 2008 08:20:55
To:users[at]httpd.apache.org
Subject: [users[at]httpd] exclude a subdirectory from authentication request

im running an apache 2.2.4...
Server version: Apache/2.2.4 (Unix)
Server built:   Jul 30 2007 17:04:39

Below is my generic directory configuration
i need some help as im a little lost

i have put something like this in my httpd.conf file to protect all my web directory's with user/pass

<Directory />
AuthType Basic
AuthName "Secure BOX"
AuthzLDAPAuthoritative On
AuthLDAPURL "ldap://localhost:389/ou=People,dc=testbox,dc=com"
Require valid-user
AllowOverride All
</Directory>

And as you know, subsequently all the directories below it are protected as well.
I need to keep this logic intact but UN-password protect a subdirectory "/users/public", so i would like to exclude then from authentication mechanism

I have read that I could just put another .htaccess file in "/users/public" to override the password protection from the httpd.conf file.

#.htaccess
Order Allow,Deny
Satisfy Any
Allow from all

I tried this but it didnt work, meaning that i was still requested for a user/pass

Is there some rules/if statement that i can put? or another method that could work the way i want it?

PS: i have more then 100 directory's and i dont want to put separately in each an authentication block and only in the directory/subdirectory where i want free access no authentication block

Best Regards
Caius

Toate cele bune,
Caius Polgar

#################################################
#Deosebim doua tipuri de pedepse. Cu viata si cu moartea#
####################################[V. Butulescu]#


caiuspolgar at yahoo

May 14, 2008, 5:43 AM

Post #3 of 4 (1853 views)
Permalink
Re: exclude a subdirectory from authentication request [In reply to]

Hello Matt,
i did what you told me and still nothing ... maybe i didnt put the right condition in the directory stanza

<Directory />
AuthType Basic
AuthName "LDAP auth realm"
AuthBasicProvider ldap
AuthLDAPURL ldap://localhost:389/ou=People,dc=mybox,dc=com?uid?one?(objectClass=*)
AuthLDAPBindDN cn=proxyagent,ou=profile,dc=mybox,dc=com
AuthLDAPBindPassword proxy
AuthzLDAPAuthoritative off
require valid-user
Options FollowSymLinks
AllowOverride All
</Directory>

<Directory /users/public>
Order Allow,Deny
Satisfy Any
Allow from all
Options Indexes IncludesNoExec
</Directory>

im pretty disappointed now ... im asking myself if what i want really works?
has anyone tried it? and worked on there box?
cause if thats the case then all i need to do is some troubleshooting :D
but if no one seen it working as i want it to work then im in big mess :(

thanks again for any feedback

matt.farey[at]gmail.com wrote: Use another directory stanza in your main httpd.conf which references the subdir you want unprotecting.
Perhaps .htaccess files are off - and with more than 100 directories, you should leave them off, especially if some are nested.


Sent from my BlackBerry® wireless device

-----Original Message-----
From: Caius

Date: Tue, 13 May 2008 08:20:55
To:users[at]httpd.apache.org
Subject: [users[at]httpd] exclude a subdirectory from authentication request

im running an apache 2.2.4...
Server version: Apache/2.2.4 (Unix)
Server built: Jul 30 2007 17:04:39

Below is my generic directory configuration
i need some help as im a little lost

i have put something like this in my httpd.conf file to protect all my web directory's with user/pass


AuthType Basic
AuthName "Secure BOX"
AuthzLDAPAuthoritative On
AuthLDAPURL "ldap://localhost:389/ou=People,dc=testbox,dc=com"
Require valid-user
AllowOverride All


And as you know, subsequently all the directories below it are protected as well.
I need to keep this logic intact but UN-password protect a subdirectory "/users/public", so i would like to exclude then from authentication mechanism

I have read that I could just put another .htaccess file in "/users/public" to override the password protection from the httpd.conf file.

#.htaccess
Order Allow,Deny
Satisfy Any
Allow from all

I tried this but it didnt work, meaning that i was still requested for a user/pass

Is there some rules/if statement that i can put? or another method that could work the way i want it?

PS: i have more then 100 directory's and i dont want to put separately in each an authentication block and only in the directory/subdirectory where i want free access no authentication block

Best Regards
Caius

Toate cele bune,
Caius Polgar

#################################################
#Deosebim doua tipuri de pedepse. Cu viata si cu moartea#
####################################[V. Butulescu]#



Toate cele bune,
Caius Polgar

#################################################
#Deosebim doua tipuri de pedepse. Cu viata si cu moartea#
####################################[V. Butulescu]#


caiuspolgar at yahoo

May 15, 2008, 1:09 AM

Post #4 of 4 (1839 views)
Permalink
Re: exclude a subdirectory from authentication request [In reply to]

problem solved, it works with this configuration

<Directory />
AuthType Basic
AuthName "LDAP auth realm"
AuthBasicProvider ldap
AuthLDAPURL ldap://localhost:389/ou=People,dc=mybox,dc=com?uid?one?(objectClass=*)
AuthLDAPBindDN cn=proxyagent,ou=profile,dc=mybox,dc=com
AuthLDAPBindPassword proxy
AuthzLDAPAuthoritative off
require valid-user
Options FollowSymLinks
AllowOverride AuthConfig
</Directory>

<Directory /users/public>
Satisfy Any
Options Indexes SymLinksIfOwnerMatch IncludesNoExec
</Directory>

Alias /public /users/public

BR,
Caius

Caius <caiuspolgar[at]yahoo.com> wrote: Hello Matt,
i did what you told me and still nothing ... maybe i didnt put the right condition in the directory stanza

<Directory />
AuthType Basic
AuthName "LDAP auth realm"
AuthBasicProvider ldap
AuthLDAPURL ldap://localhost:389/ou=People,dc=mybox,dc=com?uid?one?(objectClass=*)
AuthLDAPBindDN cn=proxyagent,ou=profile,dc=mybox,dc=com
AuthLDAPBindPassword proxy
AuthzLDAPAuthoritative off
require valid-user
Options FollowSymLinks
AllowOverride All
</Directory>

<Directory /users/public>
Order Allow,Deny
Satisfy Any
Allow from all
Options Indexes IncludesNoExec
</Directory>

im pretty disappointed now ... im asking myself if what i want really works?
has anyone tried it? and worked on there box?
cause if thats the case then all i need to do is some troubleshooting :D
but if no one seen it working as i want it to work then im in big mess :(

thanks again for any feedback

matt.farey[at]gmail.com wrote: Use another directory stanza in your main httpd.conf which references the subdir you want unprotecting.
Perhaps .htaccess files are off - and with more than 100 directories, you should leave them off, especially if some are nested.


Sent from my BlackBerry® wireless device

-----Original Message-----
From: Caius

Date: Tue, 13 May 2008 08:20:55
To:users[at]httpd.apache.org
Subject: [users[at]httpd] exclude a subdirectory from authentication request

im running an apache 2.2.4...
Server version: Apache/2.2.4 (Unix)
Server built: Jul 30 2007 17:04:39

Below is my generic directory configuration
i need some help as im a little lost

i have put something like this in my httpd.conf file to protect all my web directory's with user/pass


AuthType Basic
AuthName "Secure BOX"
AuthzLDAPAuthoritative On
AuthLDAPURL "ldap://localhost:389/ou=People,dc=testbox,dc=com"
Require valid-user
AllowOverride All


And as you know, subsequently all the directories below it are protected as well.
I need to keep this logic intact but UN-password protect a subdirectory "/users/public", so i would like to exclude then from authentication mechanism

I have read that I could just put another .htaccess file in "/users/public" to override the password protection from the httpd.conf file.

#.htaccess
Order Allow,Deny
Satisfy Any
Allow from all

I tried this but it didnt work, meaning that i was still requested for a user/pass

Is there some rules/if statement that i can put? or another method that could work the way i want it?

PS: i have more then 100 directory's and i dont want to put separately in each an authentication block and only in the directory/subdirectory where i want free access no authentication block

Best Regards
Caius

Toate cele bune,
Caius Polgar

#################################################
#Deosebim doua tipuri de pedepse. Cu viata si cu moartea#
####################################[V. Butulescu]#



Toate cele bune,
Caius Polgar

#################################################
#Deosebim doua tipuri de pedepse. Cu viata si cu moartea#
####################################[V. Butulescu]#



Toate cele bune,
Caius Polgar

#################################################
#Deosebim doua tipuri de pedepse. Cu viata si cu moartea#
####################################[V. Butulescu]#

Apache users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.