我想使用 nginx PAM 模块在 FreeBSD 系统上使用现有用户对站点进行身份验证。我尝试使用 pam_unix.so,但没有成功。它只是不让我使用我的 usr/psw 对。:(
nginx配置:
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;
}
Run Code Online (Sandbox Code Playgroud)
目录中的nginx文件/usr/local/etc/pam.d
:
auth required pam_unix.so
account required pam_unix.so
Run Code Online (Sandbox Code Playgroud)
如果有人能告诉我一个工作配置,我将不胜感激。:)