Add a New Website/Virtual Server/Domain to Virtualmin

How to create a new virtual server with Virtualmin and assign a domain name to it.

In this tutorial, I’m going to show you how to add a website to your freshly setup VPS using Virtualmin. Or add another website to the VPS that is already hosting your main website. So, you get it? Method is same even if you’re adding your first website or 10th website. Every time you want to add a new website or domain to your VPS, you should follow this tutorial.

Adding a new website or domain to Virtualmin is the same as creating a new Virtual Server. Once you create a new Virtual Server, you can host any CMS you like including WordPress, Joomla or any forum software like phpBB, bbPress or any tracking software like Prosper202, CPVLab or even complex HTML landing pages. The process also creates a MySQL user and a MySQL database so you don’t have to create them separately. So, let’s create a new virtual server,

I’m going to assume that you’ve already setup your Ubuntu 20.04 VPS with Nginx and Virtualmin or hired me to do it.

You must point your domain name to the VPS IP address for it to resolve to your VPS. Please contact your domain registrar’s technical support or refer to the knowledge base for more information on pointing domain to a web host. If you need help with it, create a topic on our web development support forum. This tutorial can be also used to create a virtual server for a sub-domain. Just type the sub-domain instead of domain name. But if your main domain is already hosted on the server, you can create a sub-server for your sub-domain which is the preferred way to host a sub-domain with Virtualmin.

 

Open your Virtualmin URL in browser and login with root account. Other users don’t have permission to create new virtual servers. Once inside, click Create Virtual Server on the left sidebar. You’ll be taken to a page similar to this,
virtualmin-top-level-server

Fill in your domain name for new website on Domain name field. Description field can be left black. But I usually type the name of CMS I’m willing to install. You can type whatever you want there. And then type in the password for new virtual server on Administration password field. This will be your FTP password for the website as well. You don’t need to change anything else on this page. So, click Create Server to continue. The process will take a few seconds. Once it’s completed, you’ll be given a link to view your server details from the bottom of page. Clicking it will take you to a page similar to this,

virtualmin-virtual-server-details

  • Domain Name – This is the domain name of your website.
  • Administration username – This is the admin username for this virtual server. You must use it to upload files to your server through FTP. This is also your MySQL database name and MySQL username.
  • Administration group – The group admin user belongs to.
  • Home directory – Default directory for admin user. You’ll be connected to this directory when you connect to your server through FTP or SSH. There is a folder named public_html within this directory. You must upload your website files to public_html directory.
  • IP Addresses – This is the public IP address of your website. You should point your domain to this IP address.
Virtualmin is now ready to host your website. You can connect to your VPS with a FTP client now and start uploading your website. Remember to use Administration username and password to login. Using root account or any other account will cause permission errors on your website.

Tharindu

Hey!! I'm Tharindu. I'm from Sri Lanka. I'm a part time freelancer and this is my blog where I write about everything I think might be useful to readers. If you read a tutorial here and want to hire me, contact me here.

Related Articles

7 Comments

  1. Hi tharindu! please , please help me i have tried all steps but i get this error

    Creating MySQL login ..
    .. MySQL database failed! : mysql::execute_sql_logged failed : SQL insert into user (host, user, ssl_type, ssl_cipher, x509_issuer, x509_subject, plugin, authentication_string) values (‘localhost’, ‘announcingweb’, ”, ”, ”, ”, ‘mysql_native_password’, password(‘mkZ3gt19E18d3Av’)) failed : Your password does not satisfy the current policy requirements at ../web-lib-funcs.pl line 1433.
    Updating Webmin user ..
    .. done

    Updating Webmin user ..
    .. done

    Saving server details ..
    .. done

    Re-loading Webmin ..
    .. done

    1. You need to disable MySQL password validation. You might have opted for it during MySQL secure installation. Search google for more information. Create a thread on our server administration forums if you can’t find how to disable it.

  2. hy ,please help me to host django website on virtualmin gpl.i bought a vps server and a domain on hostinger.And i am trying to access my dajngo website uploaded on virtualmin panle.But i can’t access my django website.It shows page not found error.Please help me to find out what changes needed to access my website.

Leave a Reply

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

Back to top button