Sunday December 22 , 2024

Virtualmin vs cPanel

Virtualmin for cPanel Users

cPanel is an old, but still very popular, webserver administration tool. Since many new Virtualmin users have only experienced system administration through cPanel, they may find some terms and concepts in Virtualmin new or confusing. This short guide will attempt to point out a few of the gotchas that we’ve found most commonly trip up former cPanel users trying out Virtualmin for the first time.  We have tried cPanel and find it a good panel, though we favor Virtualmin.


Domains vs. Virtual Servers

cPanel refers to accounts as “Domains”, while Virtualmin uses the term “Virtual Servers”. cPanel also provides numerous types of domains, like “sub-domains”, “parked domains”, and “add-on domains”. Each of these types of accounts can be replicated in Virtualmin, of course, but we think of them in different terms and the way they are created is moderately different. Virtualmin creates them with fewer steps, in most cases, and with more flexibility in all cases, but if you’ve only experienced cPanel it may be intimidating at first.


Creating a “Sub-domain”

cPanel has a type of domain account called a “sub-domain”, which creates a new virtual host that only provides web service and puts the content into a subdirectory of the document root of the parent domain.

In Virtualmin, to create a “sub-server” that uses a sub-domain name, select the virtual server account that you would like to own the domain (usually the one that has the parent domain name, but it doesn’t have to be) in the Virtualmin left-hand menu, and click “Create Virtual Server”. On the creation form, click the “Sub-server” link in the “New virtual server type:” menu at the top of the page.

Then fill in the form, with the new name and description, and click “Create Server”. You can also select a different Server Template, include initial website content either using our templates based site builder, or just by typing in some initial text in the text field (you can use the website creator at any time after creation of the domain, so you don’t have to do it right now).

Sub-server data is stored in the domains directory of the parent server home directory. So, if creating a new sub-server named sub.domain.tld the website document root would be /home/domain/domains/sub/public_html.

Sub-servers in Virtualmin are more advanced than cPanel sub-domains, in numerous ways. They can have their own PHP configuration and default version (4 or 5), their own logs directory and logging options, and even their own mailboxes (if desired). But, they can also be used in very simple ways; there’s no need to take advantage of the greater flexibility if you don’t need it.


Creating a “Parked Domain”

Parked domains in cPanel are domains that point to, or are aliases of existing domains. Virtualmin calls these by their technically accurate term, alias. This is the term used by Apache and its documentation, as well as most other web servers.

To create an alias server in Virtualmin, select the virtual server you’d like to alias, or point to, in the dropdown list in the left-hand Virtualmin menu and click “Create Virtual Server”. On the resulting form, click the “Alias of…” link in the New virtual server type: at the top of the page.

Fill in the form with domain name to alias to the selected virtual server, and a description, and click Create Server.

Virtualmin alias servers are more advanced than cPanel “parked domains” because Virtualmin alias servers can accept mail for the domain (automatically mapping users to those of existing users within the parent).


Migrating Existing cPanel Domains to Virtualmin

Virtualmin can import accounts from a cPanel backup file, including all mailboxes, databases, and web data. This can make the migration process much faster and easier, though there may still be some aspects of the account that cannot be directly translated to Virtualmin policies and practices. For example, Virtualmin features far more advanced mechanisms for executing PHP versions 4 and 5 in the same Apache and under suexec, which cannot be directly mapped from the old-style cPanel suPHP or mod_php configurations. Generally, migrations will result in working websites, but some Virtualmin features may need to be enabled (with care) in order to take full advantage of the advanced capabilities of Virtualmin.


Making the cPanel Backup

To migrate all services from a cPanel server to a Virtualmin server, you’ll need a full backup. To generate a full backup in cPanel, click on the Backup icon, and then click the Generate/Download a Full Backup link. Fill in the form, and click *Generate Backup*. Wait until you receive confirmation that the backup has completed, and then copy the file to your Virtualmin server.


Copying the cPanel Backup to Your Virtualmin Server

If your backup is small, you can use the cPanel download full backup page to download it to your PC right in your browser, and you can then use the upload form in Vitualmin.

If your backup is larger than a few megabytes, you’ll want to copy the file using a reliable transfer mechanism, like SCP. All Linux systems have scp built in, and so can easily be used to copy the file to your new Virtualmin server.

An example of scp usage:

scp backup.tar.gz This email address is being protected from spambots. You need JavaScript enabled to view it.@virtualmin.server.com This e-mail address is being protected from spambots. You need JavaScript enabled to view it :/root
Which will then prompt for your root password on the destination server.


Using the Migration Form

Once you have the backup available on the Virtualmin server (or on your local PC if it is small enough), you can then browse to the Migrate Virtual Server form by clicking on the Add Virtual Servers menu to expand it, and then clicking the Migrate Virtual Server link.

Fill in the form, selecting either to upload your backup file, or select the path to the file on your server.

Select a Backup file type of cPanel

Fill in the Domain name to migrate. This should match the domain you’ve backed up on the cPanel server.

Fill in Username for domain. This can be any valid username, but for ease of use, you may wish to use the same name used under cPanel. Virtualmin has fewer restrictions on usernames than cPanel (it allows long usernames for example, so I could name our user virtualmin rather than virtualm).

Choose a Password for administrator.

The remaining options can be left to their defaults, but it may be useful to you to change one or more of them, depending on features you’d like to use. If you will be using SSL or anonymous FTP virtual hosting, you will need to assign a new IP address just for this domain–SSL and FTP virtual hosting does not support name-based virtual servers. Realistically, anonymous FTP is almost never needed, but SSL is often required.


MySQL

Cpanel has different rules for using MySQL. In Cpanel, the domain name is pre-pended to the database name, and you can have as many databases as you want. Also, the MySQL username is pre-pended with the domain name. If you domain was www.securewebs.com, then the database might get a name like harmoni_SMF, for a Simple Machines Forum. In Webmin/VirtualMin, the assumption seems to be that you will only have one database per domain. I think you can create more. The VirtualMin implementation mirrors the MySQL implementation of MySQL logins and users, and CPanel users where this has been simplfied may be confused by this also.

Sub Menu

Data Center

We use only the best quality equipment, enabling us to provide a top performing and flexible web hosting service to our diverse range of clients.

Satisfaction Guaranteed

We offer a money back guarantee with all our plans for any cancellations made within the first 30 days of ordering.

Control Panel

Manage your virtual domains, mailboxes, databases, applications from one comprehensive and friendly interface.