Setup domain in Apache server on DigitalOcean Cloud

I am trying to set-up a domain in Apache on DigitalOcean and summarise this information after complete the task for my future reference. If this information helps other, it will be my pleasure to know that on a comment. 😉

BTW, You can host as many (multiple) domains as you want by following this steps.


#Step 1: go to by

cd /etc/apache2/sites-available

#Step 2: copy default configuration file, in my case I was configuring my site

sudo cp 000-default.conf

#Step 3: Open the file

sudo nano

#Step 4: Update following information in the open file, you you can copy below configuration and update as you needed.

<VirtualHost *:80>


DocumentRoot /var/www/html/skpaul

ErrorLog //var/www/html/skpaul/logs/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog /var/www/html/skpaul/logs/access.log combined


save the file

#Step 5: create a symlink to site-enable folder

sudo a2ensite

#Step 6: restart the server

sudo service apache2 restart

You are done, now check your site from browser.