0

I'm protecting wp-login.php via below rule:

location = /wp-login.php {
    limit_req   zone=one  burst=1 nodelay;
    include fastcgi_params;
    fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
}

My question is that. If I use below rule for all php instead of wp-login.php only, this will be good option?

Example:

    location ~ \.php$ {
         limit_req   zone=one  burst=1 nodelay;
         include snippets/fastcgi-php.conf;
         fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
         fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
         include fastcgi_params;
    }
}
Serdar Koçak
  • 67
  • 1
  • 2
  • 7

0 Answers0