this repo has no description
at main 37 lines 900 B view raw
1server { 2 listen 80; 3 server_name _; 4 root /var/www/html; 5 index index.php; 6 7 # Block access to config file 8 location = /wp-trap-config.php { 9 return 403; 10 } 11 12 # Honeypot rewrites: route wp-login.php and wp-admin to trap 13 # Only if the visitor doesn't have a valid WordPress session cookie 14 location = /wp-login.php { 15 if ($http_cookie !~* "wordpress_logged_in_") { 16 rewrite ^ /wp-trap.php last; 17 } 18 try_files $uri =404; 19 } 20 21 location = /wp-admin { 22 if ($http_cookie !~* "wordpress_logged_in_") { 23 rewrite ^ /wp-trap.php last; 24 } 25 try_files $uri =404; 26 } 27 28 location ~ \.php$ { 29 fastcgi_pass 127.0.0.1:9000; 30 fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 31 include fastcgi_params; 32 } 33 34 location / { 35 try_files $uri $uri/ =404; 36 } 37}