Administration/Apache webserver tips
From Lanius CMS Wiki
These tips are useful only to administrators who are using Apache webserver.
Limiting log entries
In order to limit either Apache or Lanius CMS log lines about weak hacking attempts, you can take advantage of some RewriteRules.
The below Apache2 configuration snippet skips most of them by redirecting them to a non existing page.
## block too long querystrings (+750 characters)
RewriteCond %{QUERY_STRING} ^.{250}.{250}.{250} [OR]
## block all remote inclusion attempts
RewriteCond %{QUERY_STRING} option=https?:// [OR]
## block attempts to look into user directories
RewriteCond %{REQUEST_URI} ^/~ [OR]
## block a type of MSWin worm
RewriteCond %{REQUEST_URI} ^/MSOffice/cltreq\.asp [OR]
## block includes_dir remote inclusion attempts
RewriteCond %{QUERY_STRING} includes_dir=https?:// [OR]
## block mambo/joomla exploit attempts
RewriteCond %{QUERY_STRING} mosConfig_absolute_path
## finally apply permanent redirection for the offender
RewriteRule ^.*?$ http://www.example.org/ [R=301,L]
Lanius CMS is not vulnerable to any of the above hacking techniques, but it is anyway useful to stop such attempts from being logged by using simple redirects.

