Sign inSign up

zhanghongyang/nginx-ldap-auth

By zhanghongyang

•Updated about 7 years ago

ldap代理,配合nginx实现访问基于ldap验证。内部配置文件配置ldap信息。

Image
0

155

zhanghongyang/nginx-ldap-auth repository overview

server { listen 192.168.1.1:80; server_name www.aaa.com⁠; location / { auth_request /auth-proxy; # 先认证 proxy_pass http://192.168.1.2:9090⁠; # 要转发到的服务 proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; } location = /auth-proxy { internal; proxy_pass http://192.168.1.3:8900⁠; # nginx-ldap-auth服务地址 proxy_pass_request_body off; proxy_set_header Content-Length ""; proxy_cache auth_cache; proxy_cache_valid 200 403 10m; proxy_cache_key "$http_authorization$cookie_nginxauth"; } }

Tag summary

Content type

Image

Digest

Size

5.1 MB

Last updated

about 7 years ago

docker pull zhanghongyang/nginx-ldap-auth