A list common actions one might want to perform with the Virtualmin control panel

Here is a collection of useful tools, commands, and information for if you’re using the Virtualmin control panel.

Missing something? Please leave a comment and we’ll gladly add it here.

Change Webmin/Virtualmin Temp Directory

You can set what Webmin uses as a temporary directory by going into Webmin -> Webmin -> Webmin Configuration -> Advanced Options, and changing “Temporary files directory”.

This is useful when you’re working with a large restore operation and you start running into disk space issues. We recommend you always change it back as we’ve seen a few instances where the default location is required or permissions becomes an issue.

Enable HTTP/2 on Ubuntu/Apache

If you run the check configuration wizard, and you see this:

Apache does not support HTTP/2 : Missing Apache mod_http2 module

It can be fixed like so:

a2enmod http2
systemctl restart apache2

In our experience systemctl restart apache2 doesn’t do the job, and you have to restart to make it work.

To check if it’s working:

curl --http2 --head hulk.vander.host

Enable / disable features in Virtualmin

To enable a feature for a specific:

virtualmin enable-feature --domain example.com --spam

To enable a feature for all domains:

virtualmin enable-feature --all-domains --virus

List of features for Apache:

[--associate]
[--unix]
[--dir]
[--dns]
[--mail]
[--web]
[--ssl]
[--logrotate]
[--mysql]
[--spam]
[--virus]
[--webmin]

If you’re running NGINX you’ll have these features:

[--virtualmin-nginx]
[--virtualmin-nginx-ssl]

Associate DNS

virtualmin enable-feature --domain example.co.za --dns --associate

What is the “Domain Lookup Server”?

What is the domain lookup server in the installation wizard? Eric posted this on the forum:

Upon receiving an email, Virtualmin determines which Virtual Server the email belongs to.
At that point, the individual Virtual Servers settings are considered when dealing with the email.
The question is asking whether you want to run the daemon process, which uses some RAM, but ultimately saves CPU and disk IO — or whether you wish to not use the lookup daemon, and launch the command line lookup process each time.

I typically would recommend using the daemon, unless you’re really low on RAM.

– Eric

Enable SSL for a Virtualmin Website using Let’s Encrypt

These days Virtualmin activates SSL for every new website it deploys. This section explains how to active it manually.

To activate it for a site, go to:

Virtualmin Tab, pick your website from the dropdown box.

Click Edit Virtual Server.

Click Enabled Features, and make sure that Apache SSL website enabled? is checked.

Click Save Virtual Server.

Once it’s enabled on the virtual server, you will still have to install an SSL certificate.

With Virtualmin is easy and if you decide on using the built-in Let’s Encrypt it’s totally free.

The basic difference between the free version of an SSL certificate and a paid for one is the paid the businesses that sell it as Thawte and Verisign would actually verify your company address, ownership, etc, whereas the free ones merely provide encryption. For 95% of businesses and websites, this will be fine.

To install an SSL certificate:

Click Server Configuration, SSL Server Certificate.

Make sure ‘Domains associated with this server’ looks right, otherwise put the correct domain names in Domain Names Listed Here. If you have subdomains you might have weird prefixes like www.subdomain.subdomain. Make sure only relevant prefixes are present. It’s okay if you get it wrong as the wizard will give you some indication where it failed.

Make sure ‘Months between automatic renewal’ is set to 2 which is anyway the default. Let’s Encrypt Certificates have to be renewed every three months, but by using Virtualmin and this setting everything will happen automatically every two months.

Create a virtual server alias

A virtual server alias is the same as a domain name alias. It’s not the primary domain name, but rather an in-place synonym for the same thing. Aliases are useful if you’re going to have a primary domain and the secondary domain name’s stuff like email must also go to the primary domain. For all intents and purpose, an alias and the main thing is now “the same”.

There is a caveat when you’re aliasing a website – it might hamper your SEO if Google thinks you’re trying to con the system by using similar names but aliases. With WordPress you won’t have this problem – it will detect in the host header an aliases is being asked for an automatically redirect the user to the proper site.

To create a virtual server alias using webmin, first create a virtual server.

Then click the box that says:

alias of yourdomain.com

Be careful to check enabled features as you might not want email for this domain.

References

Share this article

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to Top