FAQ

Page Discussion Edit History

RuHttpUserIdModule

(Redirected from NginxRuHttpUserIdModule)

Contents

[edit] ngx_http_userid_module

袦芯写褍谢褜 ngx_http_userid_module 胁褘写邪褢褌 褋ookies 写谢褟 懈写械薪褌懈褎懈泻邪褑懈懈 泻谢懈械薪褌芯胁. 袛谢褟 蟹邪锌懈褋懈 胁 谢芯谐 屑芯卸薪芯 懈褋锌芯谢褜蟹芯胁邪褌褜 锌械褉械屑械薪薪褘械 $uid_got 懈 $uid_set. 袦芯写褍谢褜 褋芯胁屑械褋褌懈屑 褋 屑芯写褍谢械屑 mod_uid 写谢褟 Apache. 袩褉懈屑械褔械薪懈械: 袠褋锌芯谢褜蟹芯胁邪褌褜 锌械褉械屑械薪薪褘械 $uid_got 懈 $uid_set 胁 SSI 薪械 锌芯谢褍褔懈褌褋褟, 锌芯褋泻芯谢褜泻褍 SSI 褎懈谢褜褌褉 芯褌褉邪斜邪褌褘胁邪械褌 写芯 userid 褎懈谢褜褌褉邪. 小芯写械褉卸邪薪懈械 袩褉懈屑械褉 泻芯薪褎懈谐褍褉邪褑懈懈 袛懈褉械泻褌懈胁褘

袩褉懈屑械褉 泻芯薪褎懈谐褍褉邪褑懈懈

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"';

[edit] 袛懈褉械泻褌懈胁褘

  • [#userid userid]
  • [#userid_domain userid_domain]
  • [#userid_expires userid_expires]
  • [#userid_name userid_name]
  • [#userid_p3p userid_p3p]
  • [#userid_path userid_path]
  • [#userid_service userid_service]

Template:Anchor

[edit] userid

syntax: userid [on|v1|log||off]

default: userid off

context: http, server, location

袪邪蟹褉械褕邪械褌 懈谢懈 蟹邪锌褉械褖邪械褌 胁褘写邪胁邪褌褜 cookie 懈 蟹邪锌懈褋褘胁邪褌褜 锌褉懈褏芯写褟褖懈械 cookie 胁 谢芯谐:

  • on 鈥 褉邪蟹褉械褕邪械褌 胁褘写邪胁邪褌褜 褋ookie 胁械褉褋懈懈 2 懈 蟹邪锌懈褋褘胁邪褌褜 锌褉懈褏芯写褟褖懈械 cookie 胁 谢芯谐;
  • v1 鈥 褉邪蟹褉械褕邪械褌 胁褘写邪胁邪褌褜 褋ookie 胁械褉褋懈懈 1 懈 蟹邪锌懈褋褘胁邪褌褜 锌褉懈褏芯写褟褖懈械 cookie 胁 谢芯谐;
  • log 鈥 蟹邪锌褉械褖邪械褌 胁褘写邪胁邪褌褜 cookie, 薪芯 褉邪蟹褉械褕邪械褌 蟹邪锌懈褋褘胁邪褌褜 锌褉懈褏芯写褟褖懈械 cookie 胁 谢芯谐;
  • off 鈥 蟹邪锌褉械褖邪械褌 胁褘写邪胁邪褌褜 cookie 懈 蟹邪锌懈褋褘胁邪褌褜 锌褉懈褏芯写褟褖懈械 cookie 胁 谢芯谐;

Template:Anchor

[edit] userid_domain

syntax: userid_domain [懈屑褟|none]

default: userid_domain none

context: http, server, location

袛懈褉械泻褌懈胁邪 蟹邪写邪褢褌 写芯屑械薪, 写谢褟 泻芯褌芯褉芯谐芯 褍褋褌邪薪邪胁谢懈胁邪械褌褋褟 cookie. 袩邪褉邪屑械褌褉 "none" 蟹邪锌褉械褖邪械褌 胁褘写邪胁邪褌褜 写芯屑械薪 写谢褟 cookie.

Template:Anchor syntax: userid_expires [胁褉械屑褟|max]

default: 薪械褌

context: http, server, location

袛懈褉械泻褌懈胁邪 蟹邪写邪褢褌 胁褉械屑褟, 胁 褌械褔械薪懈械 泻芯褌芯褉芯谐芯 斜褉邪褍蟹械褉 写芯谢卸械薪 褏褉邪薪懈褌褜 cookie. 袩邪褉邪屑械褌褉 "max" 蟹邪写邪褢褌 胁褉械屑褟 31 写械泻邪斜褉褟 2037 谐芯写邪 23:55:55 GMT. 协褌芯 屑邪泻褋懈屑邪谢褜薪芯械 胁褉械屑褟, 泻芯褌芯褉芯械 锌芯薪懈屑邪褞褌 褋褌邪褉褘械 斜褉邪褍蟹械褉褘.

Template:Anchor

[edit] userid_name

syntax: userid_name 懈屑褟

default: userid_name uid

context: http, server, location

袛懈褉械泻褌懈胁邪 蟹邪写邪褢褌 懈屑褟 cookie.

Template:Anchor

[edit] userid_p3p

syntax: userid_p3p 褋褌褉芯泻邪

default: 薪械褌

context: http, server, location

袛懈褉械泻褌懈胁邪 蟹邪写邪褢褌 蟹薪邪褔械薪懈械 写谢褟 褋褌褉芯泻懈 蟹邪谐芯谢芯胁泻邪 P3P, 泻芯褌芯褉褘泄 斜褍写械褌 胁褘写胁邪褌褜褋褟 胁屑械褋褌械 褋 cookie.

Template:Anchor

[edit] userid_path

syntax: userid_path 锌褍褌褜

default: userid_path /

context: http, server, location

袛懈褉械泻褌懈胁邪 蟹邪写邪褢褌 锌褍褌褜, 写谢褟 泻芯褌芯褉芯谐芯 褍褋褌邪薪邪胁谢懈胁邪械褌褋褟 cookie.

Template:Anchor

[edit] userid_service

syntax: userid_service 褔懈褋谢芯

default: userid_service IP-邪写褉械褋 褋械褉胁械褉邪

context: http, server, location

袛懈褉械泻褌懈胁邪 蟹邪写邪褢褌 薪芯屑械褉 褋械褉胁懈褋邪, 胁褘写邪胁褕械谐芯 cookie. 袩芯 褍屑芯谢褔邪薪懈褞 写谢褟 cookie 锌械褉胁芯泄 胁械褉褋懈懈 懈褋锌芯谢褜蟹褍械褌褋褟 薪芯谢褜, 邪 写谢褟 胁褌芯褉芯泄 鈥 IP-邪写褉械褋 褋械褉胁械褉邪.


[edit] References

Original Documentation