Re: using htaccess on all hosts to block addresses

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <dave.mehler@xxxxxxxxx> 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: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx




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

[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux