Removing password protection for a directory

If the directory /var/www/mysite/private is password protected and we want to make the subdirectory /var/www/mysite/private/public available without a password then create a new .htaccess file in that subdirectory that contains this:

Satisfy any

To do this in the main Apache configuration using :

Satisfy any

or in a block:

Satisfy any

via

Remove password protection from a subdirectory with Apache.

In 2.4 si può fare con

<Directory /www/docs>
AuthType Basic
AuthName Documents
AuthBasicProvider file
AuthUserFile /usr/local/apache/passwd/passwords
Require valid-user
</Directory>

<Directory /www/docs/public>
AuthType None
Require all granted
</Directory>

vedi

http://httpd.apache.org/docs/2.4/mod/mod_authn_core.html#authtype

Annunci