英文:
Inserting a variable in php-fpm.conf
问题
I'd like to add the date
to the name of my slow log file (to make like a rotating log).
我想将date
添加到我的慢日志文件的名称中(以实现日志轮换的效果)。
I can't find a way to do it like this in my php-fpm.conf
. The server doesn't restart with the date. Is this even possible to accomplish this way?
我找不到在我的php-fpm.conf
中以这种方式执行的方法。服务器不会使用日期重新启动。这种方式是否可能实现?
date = $(date +"%Y-%m-%d")
slowlog = /var/www/html/perf/slow-$date.log
request_slowlog_timeout = 3s
英文:
I'd like to add the date
to the name of my slow log file (to make like a rotating log).
I can't find a way to do it like this in my php-fpm.conf
. The server doesn't restart with the date. Is this even possible to accomplish this way?
[www]
date = $(date +"%Y-%m-%d")
slowlog = /var/www/html/perf/slow-$date.log
request_slowlog_timeout = 3s
答案1
得分: 2
你不能将可变变量添加到php-fpm.conf中,它不是一个PHP文件,基本上是一个文本文件。
英文:
You can't add changeable variables to php-fpm.conf , it's not a PHP file, it's basically a text file
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论