As I said in another thread, I successfully compiled Nginx using @virtubox's script, after adding a development package:
apt-get install libpam0g-dev
Then, of course, I had to modify the script to clone the mod_auth_pam repository and to
--add-module to the correct location of the cloned module.
So far, so good.