1

I want to pipe apache logs (with my custom format) to my script. I at the same time want to keep loging standard format for every vhost to separate file.

When I put CustomLog "|/path/to/my/script" myformat in httpd.conf it works perfect but only for vhosts that has no CustomLog /path/to/logs/vhostXX-logfile otherformat inside

For vhosts that has already logging in it it does not log anything to |/path/to/my/script

I could put CustomLog "|/path/to/my/script" myformat in every vhost but then script gets spawned in paralel for every single vhost and that is not acceptable.

What can I do?

2

I don't think you can do what you want in the way you are trying because of your restriction to not have multiple instances of your script.

You may get some mileage out of having the vhosts log to a named pipe and having your script read from that.

0

It's not currently possible in 2.4. GlobalLog directive was added to trunk for basically this purpose but was not backported.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.