location ~* /wp-login\.php|/wp-admin/.*\.php$ {
set $auth_basic "INPUT ID & PASSWORD";
if ($arg_action = 'postpass') {
set $auth_basic off;
}
auth_basic $auth_basic;
auth_basic_user_file /etc/nginx/conf.d/htpasswd;
fastcgi_pass unix:/run/php/php7.4-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}