访问日志Apache和httaccess [英] access log apache and httaccess

查看:265
本文介绍了访问日志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

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

这篇关于访问日志Apache和httaccess的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆