top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Size limitations in .htaccess

0 votes

It seems that I've hit a size limitation when adding unwanted IPs to a "Deny From" line.
Is there any place where this is specified?
Also, if I hit the max length on a "Deny From" line, can I add another "Deny From" line?

(Running CentOS 6, and the following version of Apache: httpd-2.2.15-28.el6.centos.x86_64)

posted May 29, 2013 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

2 Answers

0 votes

You can have multiple "deny from" lines, as well as multiple "allow from" lines (in case you want to configure access like a whitelist).

Multiple lines also help readability.

answer May 29, 2013 by anonymous
0 votes

Consider running fail2ban, and banning them using iptables?

answer May 29, 2013 by anonymous
Similar Questions
+1 vote

I googled but cant figure it out.

0 votes

I really don't understand some things about htaccess. Reading, the advice is: never permit htaccess to users. So, can I enable htaccess but only for personalize something like this?

ErrorDocument 400 /errors/badrequest.html
ErrorDocument 401 /errors/authreqd.html
ErrorDocument 403 /errors/forbid.html
ErrorDocument 404 /errors/notfound.html
ErrorDocument 500 /errors/serverr.html

and obviously deny all other directives? so an user with own htaccess file, can only personalize that directives.

+2 votes

I'm trying to use the new If directive present from Apache 2.4, to configure an htaccess based authentication for a specific Location based to the client IP address. If a client hasn't an IP address related to the internal VLAN, I would set the password access.

What is the correct syntax to have this configuration? I noticed on the documentation that there is the "-ipmatch" condition, but I don't understand well this feature.