Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

access log apache and htaccess

is there any way to config htaccess to write to access-log file which is already handled by apache in syntax

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

Need to add more varibale to custom log but dont have access to apache ,

like image 656
Marco Dz Avatar asked Jun 19 '12 08:06

Marco Dz


1 Answers

No.

Documentation clearly says that LogFormat directive can only be used in Server Config and Virtual Host contexts. This is security restriction, otherwise if your site is hacked (e.g. attacker can create or modify your .htaccess) he will be able to see all requests to your site (the main point here 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

like image 109
LazyOne Avatar answered Sep 29 '22 16:09

LazyOne