How to Host multiple website on One Droplet on Ubuntu Linux 14.04 LTS.

Now DigitlOcean cloud server price is just $5 (350 INR) per month it lowest cost server also you can host multiple website on one single droplet. Here Droplet means one Instance. On Digital Ocean you can choose any size on droplet price are depend on RAM and Storage location etc.

Here today topic we try to explain How to host multiple site on one droplet. We are assume that you have already install LAMP (Linux, Apache, MySQL and PHP).

Step #1 : Make Directory of domain name:

sudo mkdir -p /var/www/html/domainname.com/public_html

Step #2 : This directory is on root access let’s give permission to current user

sudo chown -R $USER:$USER /var/www/html/domainname.com/public_html   

Step #3 : Change Mode of www folder.

sudo chmod -R 755 /var/www	

Step #4 : Create simple index.html file for testing purpose.

sudo vi /var/www/html/domainname.com/public_html/index.html	

Step #5 : Create new Virtual Host File

sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/domainname.com.conf

Step #6 : Edit and set Parameter on Virtual Host file

sudo vi /etc/apache2/sites-available/domainname.com.conf	

Step #7 :add this parameter on VirtualHost

    ServerAdmin admin@domainname.com
    ServerName domainname.com
    ServerAlias www.domainname.com
    DocumentRoot /var/www/html/domainname.com/public_html

Step #8 : Enable the New Virtual Host Files

sudo a2ensite domainname.com.conf  

Step #9 : Restart Apache server

sudo service apache2 restart

Step #10 :Check your on browser

Lets ping through browser. 	

Read More
admin December 25, 2018 0 Comments