Jump to content

Recommended Posts

Hi,

 

I run a cluster of 6 apache servers that share a common httpd.conf (through nfs).  The problem I'm facing is with the log files.

 

I do not want each server to store the log file on their own hard drives because of space restrictions, and I instead require the log files to be on the NFS mount (located at /array/).

 

All six servers are writing to the log files at the same time, causing spliced lines and nearly unreadable output.  My question is regarding this line:

 

    CustomLog /array/log/httpd-access.log combined

 

Is there any way to save the log file to a dynamic path, such as:

 

    CustomLog /array/log/__$LOCAL_HOST_NAME$__/httpd-access.log

 

Or even better, does anyone have any ideas on how to keep a single log file for all servers, without splicing and mutilating the output, and without slowing down each server, waiting for locks on the file to release?

 

I look forward to your help.  Thanks in advance.  :)

Link to comment
https://forums.phpfreaks.com/topic/128059-dynamic-log-filename-in-httpdconf/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.