Reputation: 151
I have the following in my .htaccess file in my /var/www on my Ubuntu 14 Wordpress install.
order allow,deny
deny from 123.45.6.7
allow from all
However, when I browse to the website I get internal server error 500. It seems that all ip addresses are being blocked, not just the one I specified.
Upvotes: 1
Views: 643
Reputation: 27092
In earlier versions of Apache, you can simplify everything to:
Order Deny,Allow
Deny from 123.45.6.7
However, these directives are deprecated in Apache 2.4. Instead, you should use:
Require all granted
Require not ip 123.45.6.7
Read more in the Apache docs.
Upvotes: 3