Skip to content

Commit 22d22a8

Browse files
committed
README revisions
1 parent 83fb510 commit 22d22a8

File tree

17 files changed

+35
-145
lines changed

17 files changed

+35
-145
lines changed

README.md

Lines changed: 35 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# LDAP Authentication module for nginx
2-
LDAP module for nginx which supports authentication against multiple LDAP servers.
1+
# LDAP Authentication module for Nginx
2+
LDAP module for Nginx which supports authentication against multiple LDAP servers.
33

44
# How to install
55

@@ -18,21 +18,47 @@ Check HTTP_AUTH_LDAP options
1818

1919
## Linux
2020

21-
```bash
22-
cd ~ && git clone https://github.com/kvspb/nginx-auth-ldap.git
21+
Clone this repo or download the ZIP archive.
22+
23+
Install `libssl` and `libldap2` headers (on Debian/Ubuntu: `apt install libssl-dev libldap2-dev`).
24+
25+
You can build this module as an SO, statically compile it into the main `nginx` binary or, if using Debian/Ubuntu, build
26+
and install the deb package.
27+
28+
### Build as an SO
29+
30+
- Obtain the Nginx source (on Debian/Ubuntu this can be done with `apt-get source nginx`)
31+
- cd /path/to/nginx/source
32+
```sh
33+
./configure `nginx -V` --with-compat --add-dynamic-module=/path/to/nginx-auth-ldap/source
34+
cp objs/ngx_http_auth_ldap_module.so /usr/share/nginx/modules/ngx_http_auth_ldap_module.so
35+
```
36+
- Add the below config to Nginx so that it loads the module:
37+
```nginx
38+
load_module modules/ngx_http_auth_ldap_module.so;
2339
```
2440

25-
in nginx source folder
41+
### Build & install the deb package
2642

27-
```bash
43+
```sh
44+
sudo apt install build-essential dpkg-dev libssl-dev libldap2-dev
45+
cd /path/to/nginx-auth-ldap/source
46+
dpkg-buildpackage -b -uc
47+
sudo dpkg -i ../libnginx-mod-http-auth-ldap_1.0.0-1_amd64.deb
48+
```
49+
50+
### Statically link into Nginx
51+
52+
```sh
53+
cd /path/to/nginx/source
2854
./configure --add-module=path_to_http_auth_ldap_module
2955
make install
3056
```
3157

3258
# Example configuration
3359
Define list of your LDAP servers with required user/group requirements:
3460

35-
```bash
61+
```nginx
3662
http {
3763
ldap_server test1 {
3864
url ldap://192.168.0.1:3268/DC=test,DC=local?sAMAccountName?sub?(objectClass=person);
@@ -55,7 +81,7 @@ Define list of your LDAP servers with required user/group requirements:
5581
```
5682

5783
And add required servers in correct order into your location/server directive:
58-
```bash
84+
```nginx
5985
server {
6086
listen 8000;
6187
server_name localhost;
@@ -140,6 +166,6 @@ you'll basically need to run OpenSSL's c_rehash command in this directory.
140166
expected value: on, off
141167

142168
LDAP library default is on. This option disables usage of referral messages from
143-
LDAP server. Usefull for authenticating against read only AD server without access
169+
LDAP server. Useful for authenticating against read only AD server without access
144170
to read write.
145171

debian/.debhelper/generated/libnginx-mod-http-auth-ldap/installed-by-dh_installdocs

Whitespace-only changes.

debian/.debhelper/libnginx-mod-http-auth-ldap/dbgsym-build-ids

Lines changed: 0 additions & 1 deletion
This file was deleted.

debian/.debhelper/libnginx-mod-http-auth-ldap/dbgsym-root/DEBIAN/control

Lines changed: 0 additions & 12 deletions
This file was deleted.

debian/.debhelper/libnginx-mod-http-auth-ldap/dbgsym-root/DEBIAN/md5sums

Lines changed: 0 additions & 1 deletion
This file was deleted.

debian/.debhelper/libnginx-mod-http-auth-ldap/dbgsym-root/usr/share/doc/libnginx-mod-http-auth-ldap-dbgsym

Lines changed: 0 additions & 1 deletion
This file was deleted.

debian/libnginx-mod-http-auth-ldap/DEBIAN/control

Lines changed: 0 additions & 13 deletions
This file was deleted.

debian/libnginx-mod-http-auth-ldap/DEBIAN/md5sums

Lines changed: 0 additions & 5 deletions
This file was deleted.

debian/libnginx-mod-http-auth-ldap/DEBIAN/postinst

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)