rewritelog in htaccess not working as expected

Web hosting discussion, programming, and shared and dedicated servers.
3 posts Page 1 of 1
by nsr500 » Thu Jun 12, 2014 11:05 am
Based on this post
joemuller wrote:You are correct - the access logs are not updated in real-time.
If you do need faster logging, you can try overriding mod_rewrite (via .htaccess) to write to a separate file:
http://httpd.apache.org/docs/2.2/mod/mo ... rewritelog
tried various combinations (# lines below) but everything results in Internal Server Error so I am missing something simple. The goal is to parse the access log with less lag and update the deny list.

Suggestions?

Cheers,
Tim.

Code: Select all

#AllowOverride All
#RewriteBase /
#RewriteEngine on
# neither path works
#RewriteLog "/home/n/nsr500/access.log"
#RewriteLog "/var/log/httpd/nsr500/access.log"
#RewriteLogLevel 2
...
by joemuller » Thu Jun 12, 2014 2:31 pm
It appears, that I misspoke earlier.

According to the documentation for Apache 1.3 (http://httpd.apache.org/docs/1.3/logs.html) and specifically for rewrite (http://httpd.apache.org/docs/1.3/mod/mo ... RewriteLog), any settings for logging are not able to be changed from .htaccess. The same is true for Apache 2.x.

So, without direct access to the server-level configuration files for Apache, logs can't be changed. The newest versions of Apache allow configurations to be broken out on a per-site level for greater control, but that is not possible here.
I'm a proud employee of Sonic.net! :-)
by nsr500 » Thu Jun 12, 2014 4:02 pm
Appreciate the correction.
3 posts Page 1 of 1