In this post i am going to explain how to setup virtual host on your Cloud server. Most of developer prefer to use cloud server because you are free to do whatever you like test lots of thing scale your mobile and web application, dedicated IP’s and most important for every startup its cost very less like 5$/per month. In  my last posts i explain how to set apache on server now in this post we are going to add domain to our VPS.

Setup Apache virtual host on Cloud VPS - TrinityTuts

Set Up Apache Virtual Hosts

Step 1. Login to your server using terminal or putty.

Step 2. Create directory inside var/www/html/

Step 3. Now we need to give permission to our directory, so run below command in terminal

we also make sure we are able to read and edit file so we can give permission using this command

Step 4. Create index.html page inside /var/www/html/ which is our landing page.

Step 5. Create virtual host file by copying default virtual file

Step 6. Now we need to edit copied config file and define some parameter in it

to open and edit this

file type below command

After adding server details and location of site we need to enable virtual host file using this command

After running this we need to restart or server and go to browser and type your website url in address bar to check

If you follow every step then you see your website page live 🙂 .