How to use nginx PAM module?

Posted by Noirello on Server Fault See other posts from Server Fault or by Noirello
Published on 2012-03-23T12:47:24Z Indexed on 2012/12/20 11:04 UTC
Read the original article Hit count: 427

Filed under:
|
|
|

I would like to use nginx PAM module to authenticate a site with existing users on a FreeBSD system. I tried to use pam_unix.so, but no luck. It's just not let me in with my usr/psw pair. :(

nginx conf:
location / {
root html;
auth_pam "Secure Zone";
auth_pam_service_name "nginx";
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www/$fastcgi_script_name;
include fastcgi_params;
}

The nginx file in the /usr/local/etc/pam.d dir:
auth required pam_unix.so
account required pam_unix.so

I would appreciate if someone could tell me a working configuration. :)

© Server Fault or respective owner

Related posts about nginx

Related posts about authentication