NGINX:在“中使用变量”;“授权”;

NGINX:在“中使用变量”;“授权”;,nginx,nginx-location,Nginx,Nginx Location,我正在使用NGINX中的auth\u pam-模块对特定位置的用户进行身份验证,并希望在变量中捕获文件夹名称,而该变量应显示在auth\u pam的标题上 可能吗 location ~ /testfolder/(\d+)/(\S+)/ { auth_pam "folder1 is $1 and folder2 is $2"; auth_pam_service_name "nginx"; } 目前,使用www-servers/nginx-1.10.0,横

我正在使用NGINX中的
auth\u pam
-模块对特定位置的用户进行身份验证,并希望在变量中捕获文件夹名称,而该变量应显示在
auth\u pam
的标题上

可能吗

location ~ /testfolder/(\d+)/(\S+)/ {
  auth_pam                "folder1 is $1 and folder2 is $2";
  auth_pam_service_name   "nginx";
}
目前,使用www-servers/nginx-1.10.0,横幅显示为“folder1是$1,folder2是$2”