<!-- review: finished -->

<a id="external-auth-pam"></a>

# Auth PAM

The module adds support for PAM authentication.

<a id="installation-2"></a>

## Installation

To [install](https://en.angie.software//angie/docs/installation/index.md#install-packages) the module, use one of the following packages:

- Angie: `angie-module-auth-pam`
- Angie PRO: `angie-pro-module-auth-pam`

<a id="loading-the-module-2"></a>

## Loading the module

Load the module in the `main{}` context:

```nginx
load_module modules/ngx_http_auth_pam_module.so;
```

<a id="configuration-example-80"></a>

## Configuration example

```nginx
location /secure {
    auth_pam              "Secure Zone";
    auth_pam_service_name "angie";
}
```

As an example, to authenticate users on an LDAP server (using the `pam_ldap.so` module), the `/etc/pam.d/angie` file may contain the following:

```none
auth    required     /lib/security/pam_ldap.so
account required     /lib/security/pam_ldap.so
```

<a id="additional-information-2"></a>

## Additional information

Detailed documentation and source code are available at:
[https://github.com/sto/ngx_http_auth_pam_module](https://github.com/sto/ngx_http_auth_pam_module)
