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

The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...ranjana rawat
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxfenichawla
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...roncy bisnoi
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduitsrknatarajan
 
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTINGMANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTINGSIVASHANKAR N
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Glass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesGlass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesPrabhanshu Chaturvedi
 
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
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingrknatarajan
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Christo Ananth
 
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
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordAsst.prof M.Gokilavani
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 
(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
 

Dernier (20)

The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTINGMANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
Glass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesGlass Ceramics: Processing and Properties
Glass Ceramics: Processing and Properties
 
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
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
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
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
(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...
 

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_