标签: mod-perl

使用 ip 命名的每个客户端的自动专用 access_log

我们有一个内部应用程序,我想让 apache httpd 服务器基于每个客户端 ips 创建新的日志文件。在文档中,我看到您可以有多个日志。

http://httpd.apache.org/docs/2.2/logs.html

LogFormat "%h %l %u %t \"%r\" %>s %b" common
CustomLog logs/access_log common
CustomLog logs/referer_log "%{Referer}i -> %U"
CustomLog logs/agent_log "%{User-agent}i"
Run Code Online (Sandbox Code Playgroud)

但我真正想要的是这样的。

CustomLog logs/%h-access_log common
Run Code Online (Sandbox Code Playgroud)

其中 %h 被外推到 IP 地址,即 1.1.1.1-access_log

我想有一种 mod_perl 方法可以做到这一点,但只是想知道在我编写模块之前是否有人知道通过标准配置来做这样的事情的方法。

http configuration web mod-perl apache-2.2

0
推荐指数
1
解决办法
82
查看次数

标签 统计

apache-2.2 ×1

configuration ×1

http ×1

mod-perl ×1

web ×1