nginx后端验证模块ngx_http_auth_request_module

nginx验证模块ngx_http_auth_request_module
AuthRequestNginxModule(ngx_http_auth_request_module)
这个是nginx的一个验证模块

Here is auth request module, it allows authorization based on
subrequest result.  It works at access phase and therefore may be
nicely combined with other access modules (access, auth_basic) via
satisfy directive.
这个模块, 允许您的nginx通过发送请求到后端服务器(一般是应用服务器,例如tomcat,或者php等)进行请求, 并且根据请求决定是验证通过或者不通过。

使用方法如下:

Example usage:

location /private/ {
auth_request /auth;
...
}

location = /auth {
proxy_pass ...
proxy_set_header X-Original-Uri $request_uri;
...
}

To allow access backend should return 200, to disable - 401/403.
后端返回200 验证通过, 后端返回401或者403验证不通过

Further info is here:

进一步信息参考:

http://mdounin.ru/hg/ngx_http_auth_request_module/

http://mdounin.ru/files/ngx_http_auth_request-0.1.tar.gz

源代码如下:

http://mdounin.ru/hg/ngx_http_auth_request_module/

发表评论