FAQ

Page Discussion History

Difference between revisions of "HttpUseridModule"

(Directives)
Line 1: Line 1:
 +
<span style="color:red">WARNING: this article is obsoleted. Please refer to http://nginx.org/en/docs/ for the latest official documentation.</span>
 +
 
= Synopsis =
 
= Synopsis =
  

Revision as of 07:48, 23 August 2013

WARNING: this article is obsoleted. Please refer to http://nginx.org/en/docs/ for the latest official documentation.

Contents

Synopsis

The module ngx_http_userid_module hands out cookies which are used for the purposes of identifying clients upon subsequent requests. For logging it is possible to use variables $uid_got and $uid_set.

Remark: keep in mind variables $uid_got and $uid_set are not accessible in SSI, because the SSI filter module's processing occurs earlier in the chain than the userid filter.

This module is compatible with mod_uid for Apache.

Example

userid          on;
userid_name     uid;
userid_domain   example.com;
userid_path     /;
userid_expires  365d;
userid_p3p      'policyref="/w3c/p3p.xml", CP="CUR ADM OUR NOR STA NID"';

Directives

userid

Syntax: userid on | v1 | log | off
Default: off
Context: http
server
location
Reference:userid


Enables or disables issuing cookies and logging requested cookies:

  • on - enables version 2 cookies and logs them;
  • v1 - enables version 1 cookies and logs them;
  • log - do not send cookies, but write down incoming cookies to log;
  • off - do not send cookies, and don't write them to logs;

userid_domain

Syntax: userid_domain name | none
Default: none
Context: http
server
location
Reference:userid_domain


Assigns the domain for cookie. The parameter "none" doesn't issue domain for cookie.

userid_expires

Syntax: userid_expires time | max
Default:
Context: http
server
location
Reference:userid_expires


Sets the expiration time for the cookie.

The parameter set & send-out browser expiration time for cookie. Value "max" assigns the time on 31 December, 2037, 23:55:55 gmt. This is the maximum time that older browsers understand.

userid_name

Syntax: userid_name name
Default: uid
Context: http
server
location
Reference:userid_name


Assigns name to cookie.

userid_p3p

Syntax: userid_p3p string
Default:
Context: http
server
location
Reference:userid_p3p


Directive assigns value for the header P3P, which will sent together with cookie.

userid_path

Syntax: userid_path path
Default: /
Context: http
server
location
Reference:userid_path


Sets the cookie path.

userid_service

Syntax: userid_service number
Default: IP address of the server
Context: http
server
location
Reference:userid_service


Directive assigns the IP address of the server which gave out cookie. If not set, version 1 cookies set to zero, and for version 2 cookies the IP address of server.

References

Original Documentation