I think you'll have to put it in the documentroot of all of your
virtualhosts. Since it would be so much easier to do this in the Apache
config, I'll assume that you cannot do this for some reason.

Second best would be to create the file in one documentroot, then use hard
links to place it in all of the other documentroots.

Since the users will be editing the files in their documentroot's, take
care that you set their permissions on this file so they cannot modify it.
You would have complete mayhem if it was shared across all of your
VirtualHosts, then one of them decided to update it "just a little bit".

Of course, this means that the owners of the VirtualHosts won't be able to
use the htaccess file for their own purposes.

On 12 December 2011 16:00, David Mehler <[email protected]> wrote:

> Hello,
>
> I've got a list of host IP's i'd like to block. I want to do this with
> an .htaccess file and want it to effect all virtual hosts on my
> server. I've got the .htaccess file and am wondering where to place
> it. Can I put it in the ServerRoot area which is /srv/http I believe
> on my arch box or do I have to put in the public_html directory of
> every virtual host? Or is there another way? Ideally i'd like one one
> copy of this file to be active for all virtual hosts.
>
> Thanks.
> Dave.
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: [email protected]
>   "   from the digest: [email protected]
> For additional commands, e-mail: [email protected]
>
>


-- 
Steve Swift
http://www.swiftys.org.uk

Reply via email to