Hi, I'm looking to migrate away from a few cpanel installs and was poking at webmin/virtualmin all day.
I think I have it mostly figured out except a few questions - here's a related set of them:
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.
I see apache on webmin is built with piped logging support but the customlog directive doesn't seem to be using piped.
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? Double split plus single file would also be acceptable. 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?
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?
Howdy,
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 :-)
-Eric
Ah let me apologize and correct that - I had to go back and look at what the exact trigger issue was.
It was because of log rotation. If you don't use piped logging, every few hours, the more busy a server was, cpanel would force apache to quickly restart so it could rotate the logs.
Without an opcode cache you'd never notice. But really, everyone should be using opcode caches on a busy system, it's a drastic difference.
Cpanel's little piped logging daemon is pretty slick. We have contiguous apache uptime of weeks. But Apache comes with a basic daemon though.
Well webmin/virtualmin definitely is a viable path in my book. Takes a little getting used to from a cpanel perspective but I work mostly in the shell these days anyway.
Protip for other cpanel users when evaluating, force all the menus and items open in virtualmin/webmin with this single line in stylish:
.itemhidden,.opener_hidden {display:block !important;}
Very hard for a newbie to find where everything is, so open by default helps a lot. Maybe you could "cookie" that kind of setting as a feature.