Step-by-Step Beginner Guide: Set Up Apache on AWS EC2 with Git Bash.


Ever wondered how websites go live? In this guide, you’ll learn how to launch your web server on AWS EC2 using Git Bash on Windows. We’ll use Apache, a popular web server that delivers your site to anyone who visits it. No techy background needed, just clear, beginner-friendly steps. By the end, you’ll have a live server you can access from any browser. Let’s get started!

  1. Log in to your AWS account and create an instance:
  2. Name the instance (ApacheServer):
  3. Selete Ubuntu:
  4. Use t2 micro and select the already created key pair from the last article:

  5. Allow HTTP: with this setup, you’ll be able to view and test your work directly in the browser.
  6. Launch the Instance:
    Now, copy the IP address



OPEN GiTBASH

  1. Connect your key pair: cd downloads
  2. Run this to set permission: chmod 400 your-key.pem
  3. Connect to the instance: ssh -i your-key.pem ubuntu@ip address

    When prompted, type yes and press Enter.
  4. Upgrade the system and Install: to upgrade(sudo apt upgrade -y) and to install(sudo apt install apache2 -y):

  5. Start Apache and Enable on Boot:
  6. Go back to your instance dashboard and copy the IP address and paste it into your web browser. You should see IT WORKS!

🎉 AMAZING RIGHT!
You’ve just launched a working Apache server on AWS using Git Bash.

And there you have it, my very first Apache web server running in the cloud, powered by AWS and set up entirely through Git Bash. Not bad for a beginner, right? This is just the beginning.
Until next time, stay curious.



Source link