DEV Community

Cover image for How I Deployed a StartBootstrap Site to AWS EC2
CyberHack-08
CyberHack-08

Posted on

How I Deployed a StartBootstrap Site to AWS EC2

I've recently learnt how to use a website from Start Bootstrap and deploy it online using AWS EC2. (Read my previous articles to learn how to set up your AWS EC2).In this article, I'll walk you through all the steps I took to complete the task.

What you'll need

Step1: Launch an EC2 Instance
A. Log in to your AWS Management Console

B. Go to EC2 --> Instance --> Launch Instance --> Choose Ubuntu Server --> Create Key pair --> Launch Instance

Step 2: Startbootstrap
A. Go on, startbootstrap.com (https://startbootstrap.com/)

B. Choose any templates of your choice

C. Download the templates to your local computer

Step 3: Connect the folder you downloaded from startbootstrap using the scp command

"chmod 400 mykey.pem" --> This command changes the file permission
ssh -i "mykey.pem" ubuntu@your-public-ip
- Send the zip file to your EC2 instance

Confirm if the zip folder is already on your EC2 instance by changing directory to the folder you created if you create on and using ls to check if the folder is now in your instance.

**
Step 4: Unzip the folder using Linux packages

**

  • Install the package using "sudo apt install zip -y "

  • Use the command "unzip and Delete the zip file using the command "r*m *"

Step 5: Installing Nginx

  • Use this command: "Sudo apt install nginx -y" to install nginx

  • Copy and paste your EC2 public IP addresses to your browser

  • You should get a welcome page

Step 6: moving your folder from your EC2 instance to the browser

  • Use the command "sudo mv * /var/www/hmtl/"

-
After running the command, you can copy and paste or type your public IP address into your browser, and you will see a layout with your own IP address; so, you have completed the task.

Thanks a lot for reading! If you notice anything I could improve or explain better, please don’t hesitate to drop a comment. I’d really appreciate it!

Top comments (0)