SlideShare une entreprise Scribd logo
1  sur  21
Télécharger pour lire hors ligne
Apache
Hosting a Web-Application on
Server using a Linux
EC2 instance on AWS
by Ayomide Ogunsanya (@TheCloudLord)
INTRO
In this Project, i’ll be Launching an EC2 instance on AWS - ssh
into the instance using Git bash on my local machine - Install
Apache on the EC2 instance and Host a Web app in Apache.
The procedures are documented as clear as possible.
1.
Launch a Linux EC2 instance, on my case i used the Amazon
Linux EC2 free tier - Make sure you have your EC2 instance
inbound Security groups (2) set as (ssh port 22, source type set
to my IP) and for the second inbound rule, set as (http port 80,
source type set to Anywhere) before launching
2.
3.
Now, lets shh into our EC2 instance using our Local machine -
Click on Connect
4.
5.
Select SSH Client
6.
Locate your Private Key on your local computer - select it and right click
outside of it - from the drop down menu select Open Git Bash here to open Git
bash directly in the Private key path - Now paste command no 3 from your EC2
instance SSH Client into your Git Bash as shown
7.
then go ahead copy and paste the ssh command from your SSH Client to your Git
bash and now we have successfully ssh into our EC2 instance
Now, Lets install APACHE
Server on our EC2
instance
8.
for this, we would be running the following linux commands
sudo su
yum update -y
yum install -y httpd
sudo su to switch into superuser mode - yum update to update
our EC2 instance and - yum install to install our APACHE Server
9.
Now our APACHE Server has been Succesfully installed on our EC2
Instance
10.
Now, the Next Step is to cd into our html directory which is where
our Web App files would run from. This is done using the full path
command cd /var/www/html
Now lets download the Web app files into the html directory, this
is done by using the wget command.
I have my web app files uploaded already on my Github account
from my local computer so i would download from there. to do
this, simply go to your Github repository - click on code - go to
download zip - right click - click on copy link address
11.
right click and
click Copy link
address
12.
Now execute the command wget
https://github.com/TheCloudLord/Static-website-for-ec2-
use/archive/refs/heads/main.zip to download the web app files into
our apache server
Now use ls command to check if the downloaded file is present in
the html directory
Once we have our file present ‘main.zip’ the next thing is to unzip
the file.
13.
this is done using the unzip command
now we have unzipped succefully
Next is to move the Web App files inside the unzipped folder into the html directory to
enable our apache server run the web app, itself this is done by executing the
command cp -r Static-website-for-ec2-use-main/* /var/www/html/ and the executing
the command cp -r inance-html/* /var/www/html/ to copy completely from the inance-
html folder to the html directory
14.
Now our web app files is succesfully in the html directory and ready to be accessed
from the internet
15.
execute the command rm -rf inance-html main.zip Static-website-for-ec2-use-main to
delete duplicate files or leave if you want - Finally execute the following commands
systemctl enable httpd
systemctl start httpd to enable APACHE Server start on system boot up.
Now our Web app is succesfully hosted our web app on our Apache Server
16.
Now lets access our Web Application through the internet - Go to your EC2
Instance Dashboard on AWS - Copy and Paste the Public IPv4 address on a new
tab on your Browser to access the Web App.
17.
Our Web App is running perfectly well on our Apache Server.
Do make sure you Terminate your EC2 instance after this task to avoid
Incurred Bills.
Thanks For
Following
Lets Connect
Gmail : ayomideogunsanya@gmail.com
LinkedIn : https://www.linkedin.com/in/thecloudlord/
X : https://twitter.com/TheCloudLord_

Contenu connexe

Similaire à Host a Web Application on an Apache Server while Running the Server on an EC2 instance.

Mantis Installation for Windows Box
Mantis Installation for Windows BoxMantis Installation for Windows Box
Mantis Installation for Windows Boxguest34a3a419
 
Mantis Installation for Windows Box
Mantis Installation for Windows BoxMantis Installation for Windows Box
Mantis Installation for Windows BoxJayanta Dash
 
Deploying your rails application to a clean ubuntu 10
Deploying your rails application to a clean ubuntu 10Deploying your rails application to a clean ubuntu 10
Deploying your rails application to a clean ubuntu 10Maurício Linhares
 
Diva23
Diva23Diva23
Diva23diva23
 
Installing WordPress on AWS
Installing WordPress on AWSInstalling WordPress on AWS
Installing WordPress on AWSManish Jain
 
How To Deploy A Cloud Based Webserver in 5 minutes - LAMP
How To Deploy A Cloud Based Webserver in 5 minutes - LAMPHow To Deploy A Cloud Based Webserver in 5 minutes - LAMP
How To Deploy A Cloud Based Webserver in 5 minutes - LAMPMatt Dunlap
 
Install LAMP Stack in Linux Server OS and Hosting a Custom Domain .pptx
 Install LAMP Stack  in Linux Server OS and Hosting a Custom Domain .pptx Install LAMP Stack  in Linux Server OS and Hosting a Custom Domain .pptx
Install LAMP Stack in Linux Server OS and Hosting a Custom Domain .pptxCiceer Ghimirey
 
Project-make a public website server using raspberry pi
Project-make a public website server using raspberry piProject-make a public website server using raspberry pi
Project-make a public website server using raspberry piFahim Hossain
 
Wamp & LAMP - Installation and Configuration
Wamp & LAMP - Installation and ConfigurationWamp & LAMP - Installation and Configuration
Wamp & LAMP - Installation and ConfigurationChetan Soni
 
Setting Up a Cloud Server - Part 3 - Transcript.pdf
Setting Up a Cloud Server - Part 3 - Transcript.pdfSetting Up a Cloud Server - Part 3 - Transcript.pdf
Setting Up a Cloud Server - Part 3 - Transcript.pdfShaiAlmog1
 
Instruction: dev environment
Instruction: dev environmentInstruction: dev environment
Instruction: dev environmentSoshi Nemoto
 
5 年後還是新手 - WordPress Plugin 開發大冒險 - GOTY
5 年後還是新手 - WordPress Plugin 開發大冒險 - GOTY5 年後還是新手 - WordPress Plugin 開發大冒險 - GOTY
5 年後還是新手 - WordPress Plugin 開發大冒險 - GOTYWilliam Chong
 
Set up Hadoop Cluster on Amazon EC2
Set up Hadoop Cluster on Amazon EC2Set up Hadoop Cluster on Amazon EC2
Set up Hadoop Cluster on Amazon EC2IMC Institute
 
Google cloud essential skills challenge lab
Google cloud essential skills challenge labGoogle cloud essential skills challenge lab
Google cloud essential skills challenge labMahmmoud Mahdi
 
Deploy django apps using docker
Deploy django apps using dockerDeploy django apps using docker
Deploy django apps using dockerThomas Kremmel
 
Create dynamic sites with PHP & MySQL
Create dynamic sites with PHP & MySQLCreate dynamic sites with PHP & MySQL
Create dynamic sites with PHP & MySQLkangaro10a
 
Docker for developers on mac and windows
Docker for developers on mac and windowsDocker for developers on mac and windows
Docker for developers on mac and windowsDocker, Inc.
 
Automation of web attacks from advisories to create real world exploits
Automation of web attacks from advisories to create real world exploitsAutomation of web attacks from advisories to create real world exploits
Automation of web attacks from advisories to create real world exploitsMunir Njiru
 

Similaire à Host a Web Application on an Apache Server while Running the Server on an EC2 instance. (20)

Mantis Installation for Windows Box
Mantis Installation for Windows BoxMantis Installation for Windows Box
Mantis Installation for Windows Box
 
Mantis Installation for Windows Box
Mantis Installation for Windows BoxMantis Installation for Windows Box
Mantis Installation for Windows Box
 
Its3 Drupal
Its3 DrupalIts3 Drupal
Its3 Drupal
 
Deploying your rails application to a clean ubuntu 10
Deploying your rails application to a clean ubuntu 10Deploying your rails application to a clean ubuntu 10
Deploying your rails application to a clean ubuntu 10
 
Diva23
Diva23Diva23
Diva23
 
Its3 Drupal
Its3 DrupalIts3 Drupal
Its3 Drupal
 
Installing WordPress on AWS
Installing WordPress on AWSInstalling WordPress on AWS
Installing WordPress on AWS
 
How To Deploy A Cloud Based Webserver in 5 minutes - LAMP
How To Deploy A Cloud Based Webserver in 5 minutes - LAMPHow To Deploy A Cloud Based Webserver in 5 minutes - LAMP
How To Deploy A Cloud Based Webserver in 5 minutes - LAMP
 
Install LAMP Stack in Linux Server OS and Hosting a Custom Domain .pptx
 Install LAMP Stack  in Linux Server OS and Hosting a Custom Domain .pptx Install LAMP Stack  in Linux Server OS and Hosting a Custom Domain .pptx
Install LAMP Stack in Linux Server OS and Hosting a Custom Domain .pptx
 
Project-make a public website server using raspberry pi
Project-make a public website server using raspberry piProject-make a public website server using raspberry pi
Project-make a public website server using raspberry pi
 
Wamp & LAMP - Installation and Configuration
Wamp & LAMP - Installation and ConfigurationWamp & LAMP - Installation and Configuration
Wamp & LAMP - Installation and Configuration
 
Setting Up a Cloud Server - Part 3 - Transcript.pdf
Setting Up a Cloud Server - Part 3 - Transcript.pdfSetting Up a Cloud Server - Part 3 - Transcript.pdf
Setting Up a Cloud Server - Part 3 - Transcript.pdf
 
Instruction: dev environment
Instruction: dev environmentInstruction: dev environment
Instruction: dev environment
 
5 年後還是新手 - WordPress Plugin 開發大冒險 - GOTY
5 年後還是新手 - WordPress Plugin 開發大冒險 - GOTY5 年後還是新手 - WordPress Plugin 開發大冒險 - GOTY
5 年後還是新手 - WordPress Plugin 開發大冒險 - GOTY
 
Set up Hadoop Cluster on Amazon EC2
Set up Hadoop Cluster on Amazon EC2Set up Hadoop Cluster on Amazon EC2
Set up Hadoop Cluster on Amazon EC2
 
Google cloud essential skills challenge lab
Google cloud essential skills challenge labGoogle cloud essential skills challenge lab
Google cloud essential skills challenge lab
 
Deploy django apps using docker
Deploy django apps using dockerDeploy django apps using docker
Deploy django apps using docker
 
Create dynamic sites with PHP & MySQL
Create dynamic sites with PHP & MySQLCreate dynamic sites with PHP & MySQL
Create dynamic sites with PHP & MySQL
 
Docker for developers on mac and windows
Docker for developers on mac and windowsDocker for developers on mac and windows
Docker for developers on mac and windows
 
Automation of web attacks from advisories to create real world exploits
Automation of web attacks from advisories to create real world exploitsAutomation of web attacks from advisories to create real world exploits
Automation of web attacks from advisories to create real world exploits
 

Dernier

Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝soniya singh
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)Suman Mia
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 

Dernier (20)

★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 

Host a Web Application on an Apache Server while Running the Server on an EC2 instance.

  • 1. Apache Hosting a Web-Application on Server using a Linux EC2 instance on AWS by Ayomide Ogunsanya (@TheCloudLord)
  • 2. INTRO In this Project, i’ll be Launching an EC2 instance on AWS - ssh into the instance using Git bash on my local machine - Install Apache on the EC2 instance and Host a Web app in Apache. The procedures are documented as clear as possible.
  • 3. 1. Launch a Linux EC2 instance, on my case i used the Amazon Linux EC2 free tier - Make sure you have your EC2 instance inbound Security groups (2) set as (ssh port 22, source type set to my IP) and for the second inbound rule, set as (http port 80, source type set to Anywhere) before launching
  • 4. 2.
  • 5. 3.
  • 6. Now, lets shh into our EC2 instance using our Local machine - Click on Connect 4.
  • 8. 6. Locate your Private Key on your local computer - select it and right click outside of it - from the drop down menu select Open Git Bash here to open Git bash directly in the Private key path - Now paste command no 3 from your EC2 instance SSH Client into your Git Bash as shown
  • 9. 7. then go ahead copy and paste the ssh command from your SSH Client to your Git bash and now we have successfully ssh into our EC2 instance
  • 10. Now, Lets install APACHE Server on our EC2 instance
  • 11. 8. for this, we would be running the following linux commands sudo su yum update -y yum install -y httpd sudo su to switch into superuser mode - yum update to update our EC2 instance and - yum install to install our APACHE Server
  • 12. 9. Now our APACHE Server has been Succesfully installed on our EC2 Instance
  • 13. 10. Now, the Next Step is to cd into our html directory which is where our Web App files would run from. This is done using the full path command cd /var/www/html Now lets download the Web app files into the html directory, this is done by using the wget command. I have my web app files uploaded already on my Github account from my local computer so i would download from there. to do this, simply go to your Github repository - click on code - go to download zip - right click - click on copy link address
  • 14. 11. right click and click Copy link address
  • 15. 12. Now execute the command wget https://github.com/TheCloudLord/Static-website-for-ec2- use/archive/refs/heads/main.zip to download the web app files into our apache server Now use ls command to check if the downloaded file is present in the html directory Once we have our file present ‘main.zip’ the next thing is to unzip the file.
  • 16. 13. this is done using the unzip command now we have unzipped succefully
  • 17. Next is to move the Web App files inside the unzipped folder into the html directory to enable our apache server run the web app, itself this is done by executing the command cp -r Static-website-for-ec2-use-main/* /var/www/html/ and the executing the command cp -r inance-html/* /var/www/html/ to copy completely from the inance- html folder to the html directory 14. Now our web app files is succesfully in the html directory and ready to be accessed from the internet
  • 18. 15. execute the command rm -rf inance-html main.zip Static-website-for-ec2-use-main to delete duplicate files or leave if you want - Finally execute the following commands systemctl enable httpd systemctl start httpd to enable APACHE Server start on system boot up. Now our Web app is succesfully hosted our web app on our Apache Server
  • 19. 16. Now lets access our Web Application through the internet - Go to your EC2 Instance Dashboard on AWS - Copy and Paste the Public IPv4 address on a new tab on your Browser to access the Web App.
  • 20. 17. Our Web App is running perfectly well on our Apache Server. Do make sure you Terminate your EC2 instance after this task to avoid Incurred Bills.
  • 21. Thanks For Following Lets Connect Gmail : ayomideogunsanya@gmail.com LinkedIn : https://www.linkedin.com/in/thecloudlord/ X : https://twitter.com/TheCloudLord_