How to upgrade Virtualmin scripts when PHP version checks fail

When things have been running for long enough various updates and configuration changes start adding up with leftovers bound to cause an issue sooner or later.
With Virtualmin, one such issue is the system’s inability to automatically update its scripts to newer versions based on the incorrect detection that an older PHP version is running on the server instead of the actual one.

Automatically restart Webmin/Virtualmin in case of failure

Running out of memory sometimes happens on swap-less VPSes, and it seems Webmin (together with its twin, Virtualmin) are among the first processes to die in out-of-memory cases.

Setting up a little script to check for and restart Webmin if it is no longer running is a pretty simple (workaround) solution – but should never replace the proper procedure of adjusting the settings or upgrading the VPS to avoid running out of memory in the future.

Fixing Postfix authentication issues on CentOS 6 with Virtualmin

The weirdest errors are those occurring on a freshly installed system where you’d expect for everything to simply work (with the default configs). But such new installs rarely work.

Roudcube successfully connects and sends emails through localhost. At the same time, external clients are unable to send emails through SMTP. The issues is…

Emails not visible on freshly installed CentOS 6 with Virtualmin

Main symptom of a problem is that emails are visible in the Read User Mail utility in Webmin but they do not show up in either webmail (Roundcube/Squirrelmail), Usermin or any email client configured to connect to the server.

After further inspection, it appears the emails get delivered to /var/mail/usermailbox@domain.tld instead of /home/username/homes/usermailbox/Maildir.

Bash script to monitor and (re)start Webmin

Webmin (Virtualmin) has great service monitoring capabilities, restarting any failed services that it detects. Unfortunately, it cannot and does not monitor or restart itself it it crashes.

Still, since on (most) Linux systems it comes with a service manager, this can be used to check its status. The included bash script does this and restarts it if necessary…

Quickly view PHP’s memory_limit values for all virtual servers

When one needs to quickly check the individual PHP memory_limit value for a long list of virtual servers (presumably hosted by Virtualmin), going from folder to folder and reading the contents of the etc/php.ini file is one (loooooong) way of doing things. Fortunately, there’s an easier way, with the help …

Make Virtualmin 4 correctly display available memory on OpenVZ

Virtualmin displayed wrong amount of available memory on OpenVZ systems for a while (displaying either the guaranteed RAM instead of the burst or some random smaller value).

After the update to Virtualmin 4.02, the available RAM graph completely vanished from the system information page. To fix this…

Configure Munin to graph MySQL on CentOS 5/6 with Virtualmin

If you’re running a CentOS 5/6 VPS/Server with Virtualmin and installed Munin to graph the system stats, you’ll mostly likely notice that the generated graphs do not include MySQL.

This is expected behaviour since Virtualmin asks you to define a root password for your MySQL server (so it isn’t left unsecured out in the open), while Munin tries to read MySQL data using the root account and no password and fails.

But there’s an easy way to fix this…