Skip to content

Commit

Permalink
feat: update nginx.conf
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelfromyeg committed Dec 31, 2023
1 parent ef6adca commit 67736e6
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,22 @@ server {
ssl_certificate /etc/letsencrypt/live/api.bereal.michaeldemar.co/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/api.bereal.michaeldemar.co/privkey.pem;

# Drop requests to common WordPress paths
location ~* /wp-admin {
return 444;
}
location ~* /wp-login.php {
return 444;
}
location ~* /wp-includes {
return 444;
location / {
deny 144.255.17.181;
deny 171.34.179.120;
deny 222.94.163.44;
deny 171.116.44.119;
}
location ~* /wp-content {

if ($http_referer ~* superlum.com) {
return 444;
}
location ~* /xmlrpc.php {
return 444;

if ($http_user_agent = "" || $request_method !~ ^(GET|HEAD|POST|PUT|DELETE|OPTIONS)$ ) {
return 403;
}
location ~* /wp-json {

location ~* /(wp-admin|wp-login\.php|wp-includes|wp-content|xmlrpc\.php|wp-json) {
return 444;
}

Expand Down

0 comments on commit 67736e6

Please sign in to comment.