Nginx统一的用户权限验证系统

需要编译到Nginx --with-http_auth_request_model 

功能介绍:

主要当收到用户请求的时候 通过反向代理方式生成子请求至上游服务器,如果上游服务器返回2xx 则验证通过 可以继续执行下去 如果返回错误码是401或403则将相应返回用户

auth_request 指令

syntax:auth_request uri | off;

default: off;

context: http,server,location

auth_request_set 指令

syntax :$variable value;

context:http,server,location

猜你喜欢

转载自www.cnblogs.com/jackey2015/p/10374227.html