There are some minor adjustments to your code.
First, you should start your code with:
Otherwise there will be inconsistencies later.
You should include
libpam0g-dev to your
apt-get install line. It is necessary to include Auth PAM module, for EE compatibility.
Also, you should
git clone https://github.com/sto/ngx_http_auth_pam_module.git and include. The
./configure line should have
Finally, it is necessary to add a directive
brotly on to the vhost configuration file, or to the main nginx configuration file.