OK, I think my case is much simpler. Having
location = /something.php {
auth_basic "Restricted";
auth_basic_user_file ...;
}
before
location ~ \.php$ {
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass unix:/home/kek/http/private/php.socket;
include fastcgi_params;
try_files $uri =404;
}
Stops at the first step. Is there any way to password protect a single php file AND keep parsing it as php? Or should I copy and paste those lines into the first one?