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
#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.
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
CustomLog /var/www/html/skpaul/logs/access.log combined
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.