Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by whitelisting our website.

Setup domain in Apache server on AWS EC2 and DigitalOcean Cloud

Setup domain in Apache server on AWS EC2 and DigitalOcean Cloud

I am trying to set-up domains in the Apache server on AWS EC2 and DigitalOcean cloud’s Ubuntu instances and summarize this information after completing the task for my future reference. If this information helps you also, it will be my pleasure and you can let me know that in a comment below. 🙂

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

 

#Step 1: Navigate to the sites-available directory by following the command

cd /etc/apache2/sites-available

#Step 2: Copy default configuration file, in my case I was configuring my site skpaul.me

sudo cp 000-default.conf skpaul.me.conf

#Step 3: Open the file skpaul.me.conf

sudo nano skpaul.me.conf

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

<VirtualHost *:80>

ServerAdmin hello@skpaul.me

DocumentRoot /var/www/html/skpaul
ServerName skpaul.me
ServerAlias www.skpaul.me

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

</VirtualHost>

save the file

#Step 5: Create a symlink to the site-enable folder

sudo a2ensite skpaul.me.conf

#Step 6: Restart the server

sudo service apache2 restart

You are done, now check your site from the browser. And let me know what do you want in the next article in the comment below?

 

N.B.: I really appreciate your support if you share this information with the community.

 

Leave a Reply

Your email address will not be published. Required fields are marked *

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

Wordpress Social Share Plugin powered by Ultimatelysocial