by jlgaddis · 12y ago · 0 comments
location = /wp-login.php {
allow x.x.x.x/32;
allow y.y.y.y/32;
deny all;
} AuthType Basic
AuthName "Authentication Required"
AuthUserFile "/etc/htpasswd/.htpasswd"
Require valid-user1. Disable PHP execution in the uploads directory (hmm, wonder if it'd work if I disabled it in the entire wp-content folder?).
2. Run PHP as a different user to the file owner.
Both of these are to minimise damage when an extension is exploited by a hacker (if it hasn't happened to you yet, it will do) and to reduce the damage done to the server/site.
It sets up a hidden Wordpress admin page on the following URL:
http://www.youramazingblog.co.uk/wp-admin/?key=value
So you need to enter a key/value of your choosing in the URL before you can access the admin page.
Works pretty well especially if paired up with a decent key/value.