/etc/apache2/logs/domlogs/%user% creation
What process/script/command creations the linkage of domlogs for an account under the /etc/apache2/logs/domlogs/%user% directory?
When a new account is created domlogs are immediately created for the domain - /etc/apache2/logs/domlogs/%domain% /etc/apache2/logs/domlogs/%domain%-ssl - and then after some time, magically those domlogs get a link inside /etc/apache2/logs/domlogs/%user%. The links in /etc/apache2/logs/domlogs/%user% are not created with account creation.
Is it possible to force those links to be created after account creation? Is there a specific script I can run that will create those links?
-
@sparek-3 I don't have full information on the process but the splitlogs binary is what fulfills this portion. The docs on it are here: The splitlogs Binary | cPanel & WHM Documentation I don't think you can use it without piped logging enabled though which I believe would defeat the purpose. 0 -
I don't know if that is it. Because I don't use piped logging and this activity happens. But thus far I've only been able to conclude that it happens by magic. When I transfer or restore an account onto a server, the necessary [font="courier new">/etc/apache2/logs/domlogs/%domain% /etc/apache2/logs/domlogs/%domain%-ssl files are created. The [font="courier new">/etc/apache2/logs/domlogs/%user%/%domain% /etc/apache2/logs/domlogs/%user%/%domain%-ssl are not immediately created. But then after a period of time (which appears to be random... thus the magic part) the [font="courier new">/etc/apache2/logs/domlogs/%user%/%domain% /etc/apache2/logs/domlogs/%user%/%domain%-ssl appear. The [font="courier new">/etc/apache2/logs/domlogs/%user%/%domain% appears to be a hard link to it's [font="courier new">/etc/apache2/logs/domlogs/%domain% counterpart. It's not a huge deal. There are times when I migrate an account and I'd like to see if web hits are happening on the new server and that's easier to do with the username variant - [font="courier new">tail -f /etc/apache2/logs/domlogs/%user%/*. That and the mystery of solving the magic. 0 -
Hey @sparek-3 Sorry about the delay in response to this, I've been discussing this with someone who is pretty familiar with the configuration/piped logging in general and he indicated that running the runstatsonce script does this. So if you want to manually run this: /usr/local/cpanel/scripts/runstatsonce $USERNAME
He tested with and without piped logging enabled and found that it creates them in both instances.0 -
Indeed. This does appear to create the directory and necessary links. Mystery solved. Many thanks. 0 -
Glad to hear it!! Checking another magic trick off the list :) 0
Please sign in to leave a comment.
Comments
5 comments