http-auth-pam #

Nginx module to use PAM for simple http authentication

Source: upstream source

Directives

auth_pam #

syntax: auth_pam 1 arg (string);  ·  context: http, server, location, limit_except

If you are using a Debian GNU/Linux distribution install the `nginx-full package; the module has been included in the debian package since version 1.1.6-1, so it is available on all stable distributions since the wheezy release. ### Configuration The module only has two directives: - auth_pam`: This is the http authentication realm.

auth_pam_service_name #

syntax: auth_pam_service_name 1 arg (string);  ·  context: http, server, location, limit_except

Stores a single string value.

auth_pam_set_pam_env #

syntax: auth_pam_set_pam_env on | off (on/off flag);  ·  context: http, server, location, limit_except

Boolean directive — set to "on" or "off".

Example

location /private/ {
    auth_pam              "Restricted Area";
    auth_pam_service_name "nginx";
    auth_pam_set_pam_env  REMOTE_ADDR=$remote_addr;
}

↑ back to index