Report this

What is the reason for this report?

.htaccess deny from

Posted on March 10, 2014

This below in the new ‘securer’ wp/ubuntu site setup @ DO denies access to the site [from visitors] with internal server misconfiguration message.

<Limit GET POST> order allow,deny

start IP’s

deny from 146.0.73 deny from 146.0.74 deny from 146.0.78 deny from 146.0.79 deny from 5.39.218 deny from 5.39.219 allow from all </limit>

This works fine on other sites I have hosted at DO.

Whassup with that?



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Apologies. Prior post was Beta! <br>Allow me to be absolutely precise so there’s no confusion. <br> <br>1) The .htaccess ‘deny from’ statements were placed in the website’s root .htaccess file. And, <br> <br>2) look exactly like this <br> <br><Limit GET POST> <br>order allow,deny <br>deny from 146.0.73 <br>deny from 146.0.74 <br>deny from 146.0.78 <br>deny from 146.0.79 <br>deny from 5.39.218 <br>deny from 5.39.219 <br>allow from all <br></Limit> <br> <br>And, to repeat, these work fine on my other DO hosted sites.

my gosh can’t use angled brackets, can’t get around DO’s new folder security config. DO support says i’m in charge of site management and on and on. <br>Meanwhile all I want to do, in the spirit of DO hosting, is manage my own site security which is, now, not only wasting sooooo much of my time but is being dictated by DO - so, sometimes they want to manage and sometimes they don’t. [Yes, I’m tired of this extreme time wasting, for me, new folder security solution].

ok, DO staff is correct anyways, we are responsible for our own VPSs because it is unmanaged service. so you have to do it on your own or hire someone to do it for you… <br> <br>I started the same as you, and learned most of the stuff so there is no time wasting, but learning. <br> <br>ok, so you want to secure your folder. That seems to me Apache rule you are trying to use. <br> <br>Is that Apache + WP combination or what? or only Apache? <br> <br>if you ever made changes to your site, always always restart Apache especially if make changes with configurations. <br> <br>now the .htaccess should be similar to this: <br> <br><Directory /> <br> Order Deny,Allow <br>deny from 146.0.73 <br>deny from 146.0.74 <br>deny from 146.0.78 <br>deny from 146.0.79 <br>deny from 5.39.218 <br>deny from 5.39.219 <br>Allow from all <br></Directory> <br> <br>make sure you enclose these rules inside the directory root like above. <br> <br>and last always check the order of the rules. compare mine and yours to see the difference. <br> <br>Good luck!! <br>

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.