Необходимо отфильтровать все запросы POST в моем файле apache2 access.log и записать их в другой файл журнала. Обнаруженный модуль apache2 mod_log_config может это сделать вместе с mod_setenvif. http://httpd.apache.org/docs/current/mod/mod_log_config.html http://httpd.apache.org/docs/current/mod/mod_setenvif.html
Найден пример в руководствах
SetEnvIf Request_URI \.gif$ gif-image CustomLog "gif-requests.log" common env=gif-image CustomLog "nongif-requests.log" common env=!gif-image
Однако, я был бы очень признателен за помощь в адаптации к моим нуждам.
Пример из файла access.log должен соответствовать:
00.000.000.00 - - [07/Jun/2019:20:50:40 +0300] "POST
SetEnvIf Request_Method "POST" posts CustomLog ${APACHE_LOG_DIR}/post.log common env=posts CustomLog ${APACHE_LOG_DIR}/access.log common env=!posts
Поместите это в свои файлы виртуальных хостов (доступные сайты) и перезапустите apache2.