Apache 2 Windows 旋转日志帮助

发布于 2024-08-14 11:54:48 字数 296 浏览 6 评论 0原文

我一直在尝试在Windows Server 2k 上使用rotatelogs.exe 来轮换access.log。但是每当我重新启动 apache 时,它​​在读取 http.conf 时都会收到错误

这是一行:

CustomLog "|D:\Apache2\Apache2\bin\rotatelogs.exe D:\Apache2\Apache2\logs\access.log 86400” common

我不知道为什么它不起作用。路径正确,定义了通用日志格式。我的语法有什么地方错误吗?

I've been trying to use rotatelogs.exe on Windows Server 2k to rotate the access.log. But whenever I restart apache it gets an error when reading http.conf

Here is the line:

CustomLog "|D:\Apache2\Apache2\bin\rotatelogs.exe D:\Apache2\Apache2\logs\access.log 86400” common

I don't know why it's not working. The paths are correct, common log format is defined. Is my syntax wrong somewhere?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

つ可否回来 2024-08-21 11:54:48

尝试使用正斜杠 (/) 而不是反斜杠 (\)。

Try forward slashes (/) instead of backslashes (\).

℉絮湮 2024-08-21 11:54:48

另一种方法是使用 HalRotateLogs.exe(来自 Halcyon Logic)。

请参阅:www.halcyonlogic.com/index.php#tab-products

创建Windows计划任务以您选择的特定时间间隔(例如:每天午夜)运行该实用程序,设置好后就可以忘记它。

让事情变得简单。

Another approach would be to use HalRotateLogs.exe (from Halcyon Logic).

See: www.halcyonlogic.com/index.php#tab-products

Create a Windows Scheduled Task to run the utility at a specific interval of your choice (ex: everyday at midnight), set it and forget it.

Keep things simple.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文