Virtualmin stuff:

home | blog | Terrible people and places | Covid-19 links | Teh Internet | guest blog |rants | placeholder | political | projects | Gwen and Liam | Citadel patched | Tools | Scouts




Ever wonder --- here is where I can keep my mind free from stuff like this:

Q: Backups are failing for a domain, why?
A: If someone has removed the webroot and apache config, but the tickbox exists in enabled features, the backup will fail.
Try excluding the features your "helpful" friend removed without using the web interface one by one until you get a good backup!

Eg:
virtualmin backup-domain --dest /dest/dir/budomain.tgz --domain budomain --all-features --except-feature email --all-virtualmin --except-virtualmin mailserver --except-feature ssl --except-feature web --except-feature webalizer

virtualmin list-features
(gives the features to "except" in your list to get a good backup)

- ultimately you should reconcile the missing apache config or uncheck the "Enabled feature" under the "Edit Virtual Server" side menu if it is truly unused.


Q: My virtualmin server won't allow me to change the php version.
A:
Re-check the domain in question:
virtualmin validate-domains --domain blah.com --all-features
 - make sure webroot is correctly pointed
 - make sure the permissions are correct


Q: Why don't certs using LetsEncrypt have a correct intermediate cert?
If you don't have certbot installed, Virtualmin falls back to using the script acme_tiny.py is a fallback solution.
This script has a hard-coded intermediate cert (as of this writing).
Fix by installing certbot and Virtualmin will use the LE prescribed intermediate cert.  Might need to re-request the cert to see it.


Q: LetsEncrypt invalid email address error when requesting a cert? - certbot.errors.Error: The ACME server believes blah@localhost is an invalid email address. Please ensure it is a valid email and attempt registration again.
https://www.vishalon.net/blog/webmin-lets-encrypt-error-not-a-valid-e-mail-address
In case that goes away (short version):
VirtualMin > Select your domain > Edit Virtual Server > Configurable Settings > Contact Email > Select another radio button and provide your email address > Click “Save Virtual Server”. Now try to generate SSL certificate.


Q: Added additional php version to your Virtualmin setup and are downloading source now?
https://www.virtualmin.com/documentation/system/faq#toc-why-do-my-php-pages-download-or-display-the-source-rathe-VhTQFtUR
Repeated here in case the link breaks later:
Why do my PHP pages download or display the source, rather than executing the PHP code?
If you're seeing this issue, it's likely that a newly installed PHP version setup some Apache configuration options that's overriding your Virtualmin PHP settings.

It's a simple fix though, you just need to find the offending configuration and comment it out. The configuration to look for are "SetHandler" lines -- those can be found using the following:

On CentOS
find /etc/httpd -type f | xargs grep -i sethandler

On Ubuntu/Debian
find /etc/apache2 -type f | xargs grep -i sethandler

Look for any lines like the following:

SetHandler application/x-httpd-php

There could be more than one -- comment them all out, and then restart Apache.

And then comment that out, and restart Apache using the command service httpd restart on CentOS or service apache2 restart on Ubuntu/Debian.

Alternatively, if you added additional php versions, the distro defaults are probably wrong for Virtualmin and it can fix via:
virtualmin check-config
apache2ctl configtest
systemctl restart apache2.service



Q: Did the migration of a site between servers fail with:
Error: Failed to work out externally visible IP address

A: Try this:
System Settings -> Virtualmin Config -> Network Settings
"Network interface for virtual addresses" Detect automatically
- and re-check sites.

Found here: https://virtualmin.com/node/36996

Q: Where does the installer script keep the tarball?
A: In /var/webmin/cache/http://__blah

Q: Having install issues related to Apparmour and Bind?
A: See here: http://penguinpackets.com/~kelly/kblog/blog/01279634268

Q: Other issues with bind and recheck of configs?:
If virtualmin check-config gives you:
"ERROR: The feature BIND DNS domain cannot be disabled, as it is used by the following virtual servers"

https://archive.virtualmin.com/node/15973
In case that breaks:
One quick fix would be to get the domain's unique ID with the command :
virtualmin list-domains --domain exampledomain.com --id-only
then edit the file /etc/webmin/virtual-server/domains/$ID and remove the line dns=1
(although I change dns=0 to match the other domains)....
-- looks like mail=1 can hang things up as well :-(


Q: How do you set it up - quick notes.
A: See here: http://penguinpackets.com/~kelly/kblog/blog/01273603000

Q: Where are the installer scripts located?
A: Here they are : /usr/share/webmin/virtual-server/scripts

Q: Why are the apache logs not rotating?
A: Currently a bug.
Thanks Z! : http://www.jzahdev.com/virtualmin-gpl-logfile-rotation-error/
virtualmin disable-feature --all-domains --logrotate
virtualmin enable-feature --all-domains --logrotate

Follow up with:
For each of the sites in virtualmin:
 (the virtualmin tool probably does this, but...)
 (it will eat the error - and that is not what you want!)

logrotate -vf /etc/logrotate.d/(site name).com.conf

You will get an error like:
Ignoring /etc/logrotate.d/sitename.com.conf because of bad file mode.

Handling 0 logs

Fix with:
chmod 0644 sitename.com.conf

Fire up your logrotate again, and enjoy the regained disk space.

Assuming you already ran out of space ;-)

Looks like this is an issue with Virtualmin Version 6.05.gpl
If you are having Apache fail to restart on logrotate (weekly)
You might want to investigate the old restart vs reload (graceful)
way of doing things.



[æ]