Category Archives: Tips & Tricks

Virtualmin Update Error – [Errno 14] PYCURL

If you haven't updated your version of Virtualmin/Webmin for a while and you encountered this error when 
you tried to update - e.g. from version 4.12 to the current version 4.17:

[Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found" Trying other mirror.
See the screenshot below:

It usually means the yum cache-files are stale, i.e. the location of the required files for the update
has changed. To fix this, run:

# yum clean all
# yum check-update 

That will refresh the yum cache. Once that is done, you can run update again from the Virtualmin interface
or simply run the update command from the commandline:

# yum update

Running Virtualmin on a different port

The default port Webmin & Virtualmin listen to is port 10000. Many security professionals believe that changing the default ports of well-known services (e.g. SSH at port 22) to a different port does nothing to make the server more secure.

In a way, they are correct, but nevertheless, there are many benefits of changing the default ports of the well-known “admin” services – such as Webmin/Virtualmin and sshd. The most important benefit is that it discourages automated scanners – usually run by script kiddies looking for systems to exploit. These automated scripts will usually “move on” to another target if the known-ports are closed, e.g. if port 10000 is closed (i.e. Virtualmin listening at a different port, say, 10101), the automated script will then go on to another target in the list.

This saves resources on your server because usually, these automated scripts will follow up with a password cracker/brute-force attack to try to guess the passwords if it finds the port 10000 open (i.e. Webmin/Virtualmin is running on that port). This cause un-necessary stress on the server. Furthermore, if the administrator’s password is weak, there is a high probability that the brute-force password attack may work.

So, for those reasons, I would say, take a couple of minutes to change the default port of your Webmin/Virtualmin server.

AWStats Error – Missing Headers

Recently, I installed the RPMForge repo to setup “mod_fastcgi” on my Virtualmin server. In the “yum update” process, it inadvertently upgraded the AWStats package from the default Virtualmin package awstats-7.0-3.el6.noarch to Repoforge’s awstats-7.1-1.el6.rf.noarch.  This caused the dreaded Error – Missing Headers in AWStats!

Running the “recheck configuration” in Virtualmin showed this error message:

“The AWstats command /usr/share/awstats/wwwroot/cgi-bin/ was not found on your system.”

Searching further, it seems that Virtualmin do not recommend using 3rd party repositories as they can cause conflicts to existing packages, as in this case. I have 2 options – disable RepoForge’s repository, remove AWStats and then re-install AWStats from Virtualmin’s repo again. The risk with this method is that I might lose my existing traffic data.

So, the other more long winded method is to find out where does Virtualmin store the configuration for AWStats software and see if I can change the settings – fortunately, it is relatively easy to do so.

Goto Virtualmin –> System Settings –> Features and Plugins.

Click on the “Configure” link:

AWStats Configuratin in VirtualminOn the following page, you will see:

AWStats path in Virtualmin

Change the following Path:

Full  path to AWstats program:  /var/www/awstats/

Full path to AWstats icons directory: /var/www/awstats/icons

Full path to AWstats lang directory: /var/www/awstats/

Full path to AWstats lib directory: /var/www/awstats/

Full path to AWstats plugin directory: /var/www/awstats.

Click “Save” and AWStats should be working fine again.

Here’s the final screenshot after the change.

AWstat Missing Header Error Fixed



Sub-server vs Addon Domains

Virtualmin uses different terms which you may find confusing – especially if you’re coming from the Cpanel/WHM background. For example, a “hosting account” in Cpanel is known as a “Virtual Server” in Virtualmin.

Virtual Servers vs Hosting Accounts

In the Cpanel/WHM, one would click on the “Create Account” link to create a new hosting account, and select the appropriate hosting packages.

Create Hosting Account in Cpanel

In Virtualmin, one would click on the “Create Virtual Server” link and select the appropriate

  • Server Template  (there is no Cpanel equivalent for “Server Templates”)
  • Account Plan  (equivalent to CPanel “Packages”)

Create Virtual Server in Virtualmin

Take note of the “New virtual server type“:

The default is “Top level server” – which means, you’ll be creating another separate hosting account (i.e. different user/login ID).

If you click on the “Sub-server” link – you can either create an “addon” domain (in Cpanel lingo) or a subdomain of the parent domain in this Virtual server.  (Refer to the “Sub-servers Vs Addon Domains” section in this article).

I want to highlight the “Server Configuration Template” – from the screenshot above, you can see that it is showing “Server-X1” as the template to create this new virtual server.

A Virtualmin’s “Server Template” is a powerful feature that enables the system administrator to custom-tailor what features to enable or disable for the virtual servers.

For example, you can create a Server Template #1 that enables the “Mailman” mailing service and the MySQL database, and create another Server Template #2 that does NOT have “Mailman” and runs the PostgresSQL database instead of MySQL. This allows you to create 2 different type of Virtual Servers  (hosting accounts) – one that uses the MySQL database and has the Mailman mailing service enabled, and another type that uses the PostgresSQL database and does not have access to Mailman service.

You can  create as many Server Templates as you want, each with different settings and functionalities.

There is no “Server Template” equivalent in Cpanel/WHM – each hosting account has the same features and functions enabled. You can only specify the limits to the resources allocated, e.g. how many mailboxes, how many databases, the monthly bandwidth quota, etc.  in the “Package type”

Sub Servers vs Addon Domains

This is another source of great confusion – especially if you are familiar with Cpanel.

In Cpanel, your main hosting account is associated with the primary (main) domain, let’s say “”.  You can also create additional domains such as “”  or “” under your main hosting account – these domains are known as “Addon” domains in Cpanel.

If you create “” in Cpanel, it is known as a “subdomain”.

But in Virtualmin, the main/parent domain “” is known as the parent “Virtual Server”, and if you want to create additional domains such as “” or “” – these are known as “Sub-server” in Virtualmin (not “addon” domains).

What about “”?  In Virtualmin, it is also known as a “Sub-Server” – yes, I know, it’s confusing. But this is the naming convention chosen by the developers of Virtualmin. After a while, you’ll get used to it and it won’t be as confusing as before.


Summary of Terminologies used in Virtualmin

A “Virtual Server” (in Virtualmin) is known as a “Hosting Account” (In Cpanel)
A “Sub-Server” (in Virtualmin) is known as “Addon Domain” (in Cpanel)
A “Self/Own Sub-Server” (in Virtualmin) is known as “Subdomain” (in Cpanel)