On cpanel there was a performance issue where if you didn’t use piped logging for apache it would suffer from restarts every few hours if there was heavy logging and that is bad for opcode caches because they get cleared then.
Hmm, I don’t believe I’ve heard complaints about that… so you’re saying that on a heavy load, Apache might restart if there’s a lot of logging?
It’s possible that folks with that large a load came up with a workaround. For example, you can tweak how the Apache template looks in System Settings -> Server Templates -> Default -> Apache Website. You could make your logging work any way you like there.
However, it might be worth testing to see if that’s still a current problem, as I really don’t recall a single complaint about that.
Also related to logging apache vs cpanel, is there any way to have a centralized single error log - so only the main log splits and the error log is single file?
You can configure the logging in the Server Templates for this too – if you want to see the error logs all in one log, you can point it all at the same file. That’s not a common setup, so you’d want to test that before trying it in production just to be sure it works as expected.
Is that a matter of just removing the extra “errorlog” directive under each virtual user? Will it then go to the main errorlog instead? Can I set a template for that when adding new accounts?
You could try either removing the ErrorLog directive, or pointing the ErrorLog for each domain to the same file. I haven’t tried that before, so I don’t know how each would work – those are just the two options I would try when implementing that setup
And yeah, you can setup templates for all this in the Server Templates section.
With cpanel changing directives was very bad because it would get overwritten with upgrades so you had to use their custom include files. Will webmin respect the custom edits directly to httpd.conf and not trash them?
Well, changing logging isn’t really the issue… you can tweak the Server Templates and such, that’s what it’s there for… I’m just not sure about pointing it all to one central file. That’s not a setup most folks use, and I’m not sure what gotchas you may run into.
For example, each time you add a domain, a number of logrotate entries are added for all the logs in that domain. I’m not sure if it’ll correctly handle the case where the logs already exist and have logrotate entries already, as it’s not expecting that.
You could potentially end up with the same log being rotated a few times each night. Or Jamie may have handled that perfectly in the code, and it may not be something we need to worry about
That’s just the issue, this doesn’t come up too often, so I’m not sure. You’d have to do some experimentation on that to see what happens exactly