访问日志Apache和httaccess日志、Apache、httaccess

由网友(如鲸向海)分享简介:有没有什么办法来配置htaccess的写入这已经是语法处理由Apache访问日志文件is there any way to config htaccess to write to access-log file which is already handled by apache in syntax LogForma...

有没有什么办法来配置htaccess的写入这已经是语法处理由Apache访问日志文件

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

需要更多varibale添加到自定义日志,但不能够访问到Apache,

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

问候

推荐答案

没有。

文档的明确表示,的LogFormat 指令可以的仅在服务器配置和虚拟主机的上下文中使用。这是安全限制,否则,如果你的网站被黑客攻击(例如,攻击者可以创建或修改你的.htaccess),他将能够看到所有请求您的网站(这里主要的一点是保护您的访问者,即使你不关心这方面)。

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#日志格式

阅读全文

相关推荐

最新文章