{"id":28995081,"url":"https://github.com/axiscommunications/docker-nginx-ldap","last_synced_at":"2025-06-25T04:06:30.096Z","repository":{"id":38352252,"uuid":"379590514","full_name":"AxisCommunications/docker-nginx-ldap","owner":"AxisCommunications","description":"The official Nginx Docker image with the kvspb/nginx-auth-ldap module included.","archived":false,"fork":false,"pushed_at":"2025-05-28T14:52:21.000Z","size":31,"stargazers_count":12,"open_issues_count":0,"forks_count":9,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-05-28T15:50:42.656Z","etag":null,"topics":["alpine","amd64","arm64","armv7","docker","hacktoberfest","ldap","nginx"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/repository/docker/axistools/nginx-ldap","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AxisCommunications.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-06-23T12:09:47.000Z","updated_at":"2025-05-28T14:52:23.000Z","dependencies_parsed_at":"2024-04-24T05:51:32.594Z","dependency_job_id":"635939ca-2970-4f0c-b96e-123b6bb698b6","html_url":"https://github.com/AxisCommunications/docker-nginx-ldap","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AxisCommunications/docker-nginx-ldap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AxisCommunications%2Fdocker-nginx-ldap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AxisCommunications%2Fdocker-nginx-ldap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AxisCommunications%2Fdocker-nginx-ldap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AxisCommunications%2Fdocker-nginx-ldap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AxisCommunications","download_url":"https://codeload.github.com/AxisCommunications/docker-nginx-ldap/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AxisCommunications%2Fdocker-nginx-ldap/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261801988,"owners_count":23211664,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["alpine","amd64","arm64","armv7","docker","hacktoberfest","ldap","nginx"],"created_at":"2025-06-25T04:06:29.219Z","updated_at":"2025-06-25T04:06:30.085Z","avatar_url":"https://github.com/AxisCommunications.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nginx-ldap\n\nThe official Nginx [Docker image][1] with the [kvspb/nginx-auth-ldap][2]\nmodule included, in order to add the functionality of authenticating users\nvia an LDAP server.\n\nIf you are not building this directly yourself you may find information about\navailable tags over on [Docker Hub][6].\n\n## Usage\nThe LDAP module is added in such a way that everything else inside the container\nis exactly as it is inside the [official Nginx image][1]. This means that how\nto use this image is basically identical to the parent, but with this you also\nhave the ability to authenticate users via LDAP if you want to.\n\nHowever, if you intend to overwrite the `/etc/nginx/nginx.conf` file, inside\nthe image, you must include the following line at the top of your custom one:\n\n```\nload_module modules/ngx_http_auth_ldap_module.so;\n```\n\notherwise the [dynamic][5] LDAP module will not be loaded.\n\nThe LDAP server(s) then needs to be added to the `http` block of the\nconfiguration, before it is used inside the `server` blocks.\n\n#### Example\n```\nhttp {\n    ldap_server test1 {\n        url ldaps://192.168.0.1:3269/DC=test,DC=local?sAMAccountName?sub?(objectClass=person);\n\n        binddn \"TEST\\\\LDAPUSER\";\n        binddn_passwd LDAPPASSWORD;\n\n        require valid_user;\n        satisfy all;\n\n        max_down_retries_count 3;\n    }\n\n    server {\n        listen       8080;\n        server_name  localhost;\n\n        auth_ldap \"Forbidden\";\n        auth_ldap_servers test1;\n\n        location / {\n            root   html;\n            index  index.html index.htm;\n        }\n    }\n}\n```\n\nMore details about all possible configuration options are available in the\n[kvspb/nginx-auth-ldap][2] repository.\n\n\u003e NOTE: Nginx loads files from the `conf.d/` folder in [alphabetical order][4],\n        so to split the above configuration into two files the one containing\n        the LDAP settings should be named similar to \"`00-ldap.conf`\".\n\n\n## Acknowledgments and Thanks\nInspiration for this project has been collected from the following sources:\n\n- https://gist.github.com/hermanbanken/96f0ff298c162a522ddbba44cad31081\n- https://stackoverflow.com/questions/57739560/what-do-i-need-to-change-in-nginx-official-dockers-image-to-have-the-set-misc-n\n- https://github.com/liminaab/infra-hub/tree/master/nginx-ldap\n\nand the GitHub Actions configurations have been reused from the original\nauthor's personal project:\n\n- https://github.com/JonasAlfredsson/docker-nginx-certbot\n\n\n\n\n\n\n[1]: https://github.com/nginxinc/docker-nginx/blob/master/mainline/alpine/Dockerfile\n[2]: https://github.com/kvspb/nginx-auth-ldap\n[3]: https://hub.docker.com/_/nginx\n[4]: https://serverfault.com/a/361163\n[5]: https://docs.nginx.com/nginx/admin-guide/dynamic-modules/dynamic-modules/\n[6]: https://hub.docker.com/repository/docker/axistools/nginx-ldap\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faxiscommunications%2Fdocker-nginx-ldap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faxiscommunications%2Fdocker-nginx-ldap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faxiscommunications%2Fdocker-nginx-ldap/lists"}