Setup domain in Apache server on DigitalOcean Cloud

I am trying to set-up a domain in Apache on DigitalOcean and summaries 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.

Inspire Me :)

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.