Domain and Hosting Configuration in Digital Ocean

Domain and Hosting Configuration in Digital Ocean

I have purchased a domain from ‘Exonhost’. I want to host it in Digital Ocean Droplet. Let’s follow the below steps:


Step-1: Login to your digital ocean account.
A.	go to Manage from left sidebar >> click on Networking: Enter a domain that you own below and start managing your DNS within your DigitalOcean account.

B. Click on the manage section from right side of your newly created domain:

C. Add the below record:

D. Copy the DNS and use it in the step-2:


Step-2: Now login in your domain panel: 
A.	Copy the DNS from your hosting and add as below: 


Step-3: Open your terminal and login into your hosting server with root privilege. 

A.	Go to sites-available directory using cd ‘/etc/apache2/sites-available’ command
Create a new file ‘touch 41-JULHAS.COM’ (I have added here 41 because in this hosting, we have 40 other sites)
B.	Now open this file and add the below code: 
<-VirtualHost *:80>
       ServerAdmin webmaster@localhost
       ServerName www.julhas.com
       ServerAlias julhas.com
   DocumentRoot /var/www/html/ julhas.com /
     ErrorLog ${APACHE_LOG_DIR}/error-julhas.com.log
     <-Directory />
          Allowoverride All
          Require all granted
     <-/Directory>
      # Possible values include: debug, info, notice, warn, error, crit,
      # alert, emerg.
      LogLevel warn
       CustomLog ${APACHE_LOG_DIR}/access.log combined
<-/VirtualHost>

C.	Back from here and go  cd ‘sites-enabled’ directory
Type the below command: ln -s /etc/apache2/sites-available/41-JULHAS.COM 41-JULHAS.COM.conf




Step-04: Visit your root directory: /var/www/html
A.	Create a directory: julhas.com
B.	Upload all of your apps/software/website files
Step-05: Restart your server: `service apache2 restart`. Type your apps in browser and enjoy it!

  • Feel free to contact me:

Mohammad Julhas Sujan DHIS2 Developer Department of Informatics University of Oslo Cell: +8801989-442856 Email: julhaspustcse@gmail.com Skype: julhas08 Website: www.julhas.com