Skip to content

Instantly share code, notes, and snippets.

@Inndy
Last active January 21, 2016 03:32
Show Gist options
  • Save Inndy/7388ac53cfe6e8274af2 to your computer and use it in GitHub Desktop.
Save Inndy/7388ac53cfe6e8274af2 to your computer and use it in GitHub Desktop.
Wordpress ban hacker!!!!
location ^~ /wp-login.php {
if ($http_user_agent ~* sqlmap|NESSUS|hacker|MSIE) {
return 404;
}
if ($arg_action = lostpassword) {
return 403;
}
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
}
location / {
# try_files $uri $uri/ =404;
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment