How to host application on subdomain using ServerAvatar

How to host application on subdomain using ServerAvatar

ServerAvatar was built to configure Web servers and host multiple WordPress websites with custom domains. The way the first version of ServerAvatar worked is very much different than the current version.

With the updated version, you can add as many subdomains as you want. More than that, You don’t even have to worry whether your domain name is pointing to your server managed by ServerAvatar or not.

In this tutorial, I am going to show you how you can host your PHP application on a subdomain using ServerAvatar. You have to add A record in your DNS zone as your subdomain and point it to the IP address of the server managed by ServerAvatar. Don’t worry about this now because I will show you how exactly you can do that.

So, Assuming you have connected your server with ServerAvatar, we can get started! If you haven’t, Learn to connect your server with ServerAvatar before moving ahead with this tutorial. Here are the steps we are going to follow to host our application on a subdomain on VPS using ServerAvatar.

  1. Adding A record in DNS zone
  2. Creating an application using ServerAvatar

Yes, there are only two steps to host a subdomain with ServerAvatar. So, let’s get started with the first step.

Adding A record in DNS zone

There are many types of records in DNS. For example, A record will point to an IP address you specify. It can be different. In case of Subdomains, We can make subdomains point to another IP address than your actual domain’s IP address. While CNAME record will point to another A record which is pointing to specific IP address.

In this case, We will create an A record because we want to point our subdomain to the IP address of the server managed by ServerAvatar. So, I have created and connected my test server with my ServerAvatar account and here is the A record I have created in my DNS Zone file.

Adding A record for subdomain

Make sure the IP address of the A record you are adding points to the server managed by ServerAvatar. Now, Add the A record and make sure you can visit your subdomain from your browser. It would show a message “Managed by ServerAvatar“.

You can also double check by executing the following command and verifying the IP address.

ping yoursubdomain.yourdomain.com

Once you are sure that your subdomain is pointing the right server, Go ahead with the second step.

Creating an application using ServerAvatar

Now, Open up the server panel for the server on which you want to host the subdomain. Then click on the CREATE link given in the Applications card just like the following image.

Create PHP application using ServerAvatar

Now, you will see a form with multiple fields. You have to fill out the form based on your application’s requirements. In this case, we want to add a subdomain. We will simply put our subdomain the field with label domain/subdomain in the application creation form.

Create application on subdomain

Now, Select the type of the application you want to host. If you want to host custom PHP application, select Custom from the dropdown and if you want to install WordPress, select WordPress from the dropdown as the application type.

Once you have completed these steps, Click on Create application button and your application will be deployed according to your requirements on your VPS connected with ServerAvatar.

 

Conclusion: It is as easy as adding a domain to the server. You just have to add an A record in your DNS zone file and you are good to go! Also, Primary domain isn’t required to add subdomain with ServerAvatar. If you are facing issues following this guide, Please let us know in the comment section and we will help you solve your query.

Sharing is caring 🙂
2Shares

Leave a Comment

So glad to see you sticking around!

Interesting in learning New techniques to Improve the performance of your WordPress/PHP website or your Web Server?

Enter your E-mail below and get new techniques that we discover by experimenting new stuff directly to your inbox!

Thank You For Subscribing

This means the world to us!

Spamming is not included! Pinky promise.