VestaCP is a free and open-source alternative to cPanel. After installing Vesta Control Panel on your Linux server, point your domain name or subdomain to your server's Name Server records.
Login by either typing the hostname or the ip address followed by the login port which is :8083. Enter the login credentials and click the log in button. If you are admin of the control panel, then it is recommended to create a new user and host your new website in that new user account.
Navigate to the WEB section of VestaCP. Then, click on the green + to add your new website. Enter the domain name which you would like to host on your server and click on the Add button.
To add a new Database, navigate to the DB section and click on the Add database button. Then, you need to add the Database Name, Username, Password, type (mysql in most cases), host (localhost in most cases), Charset (utf8 in most cases).
VestaCP has a premium File Manager just like the one of cPanel. In case you don’t have VestaCP’s implemented File Manager, you can use FTP clients like Filezilla.
To connect to your website, enter the username and password of your control panel and in the hostname field put the IP address of your server.
Now, open the web folder, then open the folder which is named the same as your domain name and then finally open the public_html folder. Delete the index.html file and start uploading your website’s files.
Creating a sub domain is the same as creating a top level domain. Add a new website in the WEB section and in the domain field, enter the full sub domain URL instead of just the top level domain.
A new directory will be created for uploading the contents for the Sub Domain just like for a top level domain.