Movatterモバイル変換


[0]ホーム

URL:


Modules |Directives |FAQ |Glossary |Sitemap

Apache HTTP Server Version 2.4

<-
Apache >HTTP Server >Documentation >Version 2.4 >Modules

Apache Module mod_authn_anon

Available Languages: en  | fr  | ja  | ko 

Description:Allows "anonymous" user access to authenticated areas
Status:Extension
Module Identifier:authn_anon_module
Source File:mod_authn_anon.c
Compatibility:Available in Apache 2.1 and later

Summary

This module provides authentication front-ends such asmod_auth_basic to authenticate users similar to anonymous-ftp sites,i.e. have a 'magic' user id 'anonymous' and the email address as a password. These email addresses can be logged.

Combined with other (database) access control methods, this allows for effective user tracking and customization according to a user profile while still keeping the site open for 'unregistered' users. One advantage of using Auth-based user tracking is that, unlike magic-cookies and funny URL pre/postfixes, it is completely browser independent and it allows users to share URLs.

When usingmod_auth_basic, this module is invoked via theAuthBasicProvider directive with theanon value.

Support Apache!

Topics

Directives

Bugfix checklist

See also

top

Example

The example below is combined with "normal" htpasswd-file based authentication and allows users in additionally as 'guests' with the following properties:

Example

<Directory "/var/www/html/private">    AuthName "Use 'anonymous' & Email address for guest entry"    AuthType Basic    AuthBasicProvider file anon    AuthUserFile "/path/to/your/.htpasswd"        Anonymous_NoUserID off    Anonymous_MustGiveEmail on    Anonymous_VerifyEmail on    Anonymous_LogEmail on    Anonymous anonymous guest www test welcome        Require valid-user</Directory>
top

AnonymousDirective

Description:Specifies userIDs that are allowed access withoutpassword verification
Syntax:Anonymoususer [user] ...
Context:directory, .htaccess
Override:AuthConfig
Status:Extension
Module:mod_authn_anon

A list of one or more 'magic' userIDs which are allowed access without password verification. The userIDs are space separated. It is possible to use the ' and " quotes to allow a space in a userID as well as the \ escape character.

Please note that the comparison iscase-IN-sensitive.
It's strongly recommended that the magic username 'anonymous' is always one of the allowed userIDs.

Example:

Anonymous anonymous "Not Registered" "I don't know"

This would allow the user to enter without password verification by using the userIDs "anonymous", "AnonyMous", "Not Registered" and "I Don't Know".

As of Apache 2.1 it is possible to specify the userID as "*". That allowsany supplied userID to be accepted.

top

Anonymous_LogEmailDirective

Description:Sets whether the password entered will be logged in theerror log
Syntax:Anonymous_LogEmail On|Off
Default:Anonymous_LogEmail On
Context:directory, .htaccess
Override:AuthConfig
Status:Extension
Module:mod_authn_anon

When setOn, the default, the 'password' entered (which hopefully contains a sensible email address) is logged in the error log.

top

Anonymous_MustGiveEmailDirective

Description:Specifies whether blank passwords are allowed
Syntax:Anonymous_MustGiveEmail On|Off
Default:Anonymous_MustGiveEmail On
Context:directory, .htaccess
Override:AuthConfig
Status:Extension
Module:mod_authn_anon

Specifies whether the user must specify an email address as the password. This prohibits blank passwords.

top

Anonymous_NoUserIDDirective

Description:Sets whether the userID field may be empty
Syntax:Anonymous_NoUserID On|Off
Default:Anonymous_NoUserID Off
Context:directory, .htaccess
Override:AuthConfig
Status:Extension
Module:mod_authn_anon

When setOn, users can leave the userID (and perhaps the password field) empty. This can be very convenient for MS-Explorer users who can just hit return or click directly on the OK button; which seems a natural reaction.

top

Anonymous_VerifyEmailDirective

Description:Sets whether to check the password field for a correctlyformatted email address
Syntax:Anonymous_VerifyEmail On|Off
Default:Anonymous_VerifyEmail Off
Context:directory, .htaccess
Override:AuthConfig
Status:Extension
Module:mod_authn_anon

When setOn the 'password' entered is checked for at least one '@' and a '.' to encourage users to enter valid email addresses (see the aboveAnonymous_LogEmail).

Available Languages: en  | fr  | ja  | ko 

top

Comments

Notice:
This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Libera.chat, or sent to ourmailing lists.

Copyright 2025 The Apache Software Foundation.
Licensed under theApache License, Version 2.0.

Modules |Directives |FAQ |Glossary |Sitemap


[8]ページ先頭

©2009-2025 Movatter.jp