1

I want to log all request- (and maybe also response-) headers of requests, that are made to a certain file on an Apache server. I have tried a php script, but that only fires when I request it directly. Is there any way to log all the requests on a file that I can specify? (If it does matter: in my case the file I want to log the requests for, is a mp4 file.)

4

1 回答 1

1

是的,您可以设置环境变量以用于确定日志记录行为

SetEnvIf Request_URI /this/is/a/url.html$ thisurllog
CustomLog thisurl.log common env=thisurllog
CustomLog access.log common env=!thisurllog

最后一行将阻止该 URI 的条目登录公共访问日志。如果您可以两次登录两个日志,则可以省略。

于 2015-03-03T16:22:44.923 回答