Skip to content

Commit

Permalink
Create webserver.sh
Browse files Browse the repository at this point in the history
Creating WebSite for first time in AWS EC2 Launch
  • Loading branch information
Ankam Ravi Kumar authored Dec 20, 2018
1 parent 40302ee commit e521deb
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions webserver.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash
##To Install HTTPD Server and Start Service
DEFAULTPATH="/var/www/html/index.html"
sudo yum update –y;
sudo yum install httpd –y;
sudo service httpd start;
sudo chkconfig httpd on;

sudo systemctl enable httpd.service;
sudo systemctl start httpd.service;

sudo echo '<html>' > $DEFAULTPATH
sudo echo '<h1> H1! Welcome To My First Website in AWS </h1>' >> $DEFAULTPATH
sudo echo '</html>' >> $DEFAULTPATH

## END ##

0 comments on commit e521deb

Please sign in to comment.