### HttpUserId
The module ngx_http_userid_module gives out cookies for identification of clients. 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 SSI filter module working before userid filter.
This module is compatible with [mod_uid](http://www.lexa.ru/programs/mod-uid-eng.html "http://www.lexa.ru/programs/mod-uid-eng.html") 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"';
~~~
### 鎸囦護
### userid
**syntax:***userid [on|v1|log||off]*
**default:***userid off*
**context:***http, server, location*
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:***userid_domain none*
**context:***http, server, location*
Assigns the domain for cookie. The parameter "none" doesn't issue domain for cookie.
### userid_expires
**syntax:***userid_expires [ time | max ]*
**default:***none*
**context:***http, server, location*
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:***userid_name uid*
**context:***http, server, location*
Assigns name to cookie.
### userid_p3p
**syntax:***userid_p3p line*
**default:***none*
**context:***http, server, location*
Directive assigns value for the header P3P, which will sent together with cookie.
### userid_path
**syntax:***userid_path path*
**default:***userid_path /*
**context:***http, server, location*
Sets the cookie path.
### userid_service
**syntax:***userid_service number*
**default:***userid_service address*
**context:***http, server, location*
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](http://sysoev.ru/nginx/docs/http/ngx_http_userid_module.html "http://sysoev.ru/nginx/docs/http/ngx_http_userid_module.html")
- 主要文檔
- Nginx功能概述
- 為什么選擇Nginx
- Nginx安裝
- 運行和控制Nginx
- 配置符號參考
- 優化 Nginx
- 常見問題(FAQ)
- 調試 nginx
- 核心模塊
- Nginx主模塊
- Nginx事件模塊
- 基本模塊
- http核心模塊
- HttpIndex模塊
- HttpAccess模塊
- HttpAuthBasic模塊
- HttpAutoindex模塊
- Browser模塊
- Charset模塊
- HttpEmptyGif模塊
- HttpFcgi模塊
- Geo模塊
- HttpGzip模塊
- HttpHeaders模塊
- HttpIndex模塊
- HttpReferer模塊
- HttpLimit zone
- HttpLimitReqest模塊
- HttpLog模塊
- map
- Memcached
- HttpProxy模塊
- HttpRewrite模塊
- HttpSSI模塊
- HttpUserId
- 其他模塊
- Addition模塊
- EmbeddedPerl
- flv
- HttpGzipStatic
- RandomIndex
- HttpGeoIP
- HttpRealIp
- HttpSSL
- StubStatus模塊
- HttpSubstitution
- HttpDav模塊
- GooglePerftools
- HttpXSLT
- HttpSecureLink
- HttpImageFilter
- mail模塊
- MailCore
- MailAuth
- MailProxy
- MailSSL
- 安裝
- nginx在windows上的安裝
- nginx在freebsd上的安裝
- nginx在ubuntu上的安裝
- nginx在fedora上的安裝
- nginx php-fpm安裝配置
- 配置示例和方法
- 完整例子
- 完整例子2
- 虛擬主機
- 負載均衡
- nginx防盜鏈
- HWLoadbalancerCheckErrors