You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "Hu, Meng P (Meng Pei)" <me...@lucent.com> on 2002/12/12 23:47:40 UTC

[users@httpd] Apache Authentication

Hi,

How do I configure Apache only authenticating one certain directory, and by pass the others ?

The following are part of my httpsd.conf :

AuthType Basic
AuthName "Web Server"
AuthUserFile /etc/security/local_passwd
Require valid-user

thanks,
mengpei


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache Authentication

Posted by "Dharmendra.T" <dh...@nsecure.net>.
On Friday 13 December 2002 04:17, Hu, Meng P (Meng Pei) wrote:
> Hi,
>
> How do I configure Apache only authenticating one certain directory, and by
> pass the others ?
>
> The following are part of my httpsd.conf :
>
> AuthType Basic
> AuthName "Web Server"
> AuthUserFile /etc/security/local_passwd
> Require valid-user
>
> thanks,
> mengpei
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org

 To restrict a directory to any user listed in the users file just created, 
you should create a .htaccess file containing:

AuthName "restricted stuff"
  AuthType Basic
  AuthUserFile /usr/local/etc/httpd/users

  require valid-user

 To allow a directory to be restricted within a .htaccess file, you first need 
to ensure that the access.conf file allows user authentication to be set up 
in a .htaccess file. This is controlled by the AuthConfig override. The 
access.conf file should include AllowOverride AuthConfig to allow the 
authentication directives to be used in a .htaccess file.



-- 
Regards,
Dharmendra.T
Linux Security Expert
www.nsecure.net
dharmu@nsecure.net

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org