Access apache and httaccess logs

is there any way to configure htaccess to write to an access log file that is already being processed by apache in syntax

LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined 

You need to add more varibale to your own log, but not have access to apache,

Hi

+6
source share
1 answer

Not.

The documentation clearly says that the LogFormat directive can only be used in the context of server configuration and virtual host. This is a security restriction, if your site is hacked (for example, an attacker can create or modify your .htaccess), he will be able to see all requests to your site (the main thing is to protect your visitors, even if you do not care about this aspect).

http://httpd.apache.org/docs/current/mod/mod_log_config.html#logformat

+6
source

Source: https://habr.com/ru/post/918453/


All Articles