Sentora Support Forums
Global .htaccess for Sentora and/or Apache - Printable Version

+- Sentora Support Forums (https://senforums.mach-hosting.com)
+-- Forum: Sentora Forum Archives (https://senforums.mach-hosting.com/forumdisplay.php?fid=5)
+--- Forum: Sentora Public Support Forums v1.0.x (https://senforums.mach-hosting.com/forumdisplay.php?fid=32)
+---- Forum: General Support Forum v1.0.x (https://senforums.mach-hosting.com/forumdisplay.php?fid=36)
+---- Thread: Global .htaccess for Sentora and/or Apache (/showthread.php?tid=11948)



Global .htaccess for Sentora and/or Apache - rsthomas - 01-10-2020

Is there a location for a "common" .htaccess file that all visitors on a server pass through in order to reach a specific domain? This would be used to store a list of IP Address denies rather than having to create an .htaccess for each domain's site.


RE: Global .htaccess for Sentora and/or Apache - sparkrack - 01-11-2020

HTACCESS is generally document root specific. To my knowledge there is not a global .htaccess for the document roots in /var/sentora/hostdata. But there may be for the UI itself.

It would be more beneficial to put your IP denies in /etc/hosts.deny, that way they are completely blocked from the server.


RE: Global .htaccess for Sentora and/or Apache - Vedran B - 01-13-2020

(01-10-2020, 12:32 AM)rsthomas Wrote: Is there a location for a "common" .htaccess file that all visitors on a server pass through in order to reach a specific domain?  This would be used to store a list of IP Address denies rather than having to create an .htaccess for each domain's site.

Not an Apache functionality, definately go with fail2ban, customize some jails, write your own... I have around 3000-4000 banned IP's on a 7 day ban and around 800 in recidive jail on a month long ban. It does great job lowering the load on your servers.

Protips: 
- move ssh port to some other than 22 and auto-ban all ip's connecting to 22. it's such a sweet honeypot. 
- use webexploits jail, use fakegooglebot jail
- use badbots jail with updated botlist from here: https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker (needs escaping)