Skip to content

Instantly share code, notes, and snippets.

@nijjwal
Last active March 9, 2020 01:25
Show Gist options
  • Save nijjwal/8da28c9acff8baf45922e4c34ed77041 to your computer and use it in GitHub Desktop.
Save nijjwal/8da28c9acff8baf45922e4c34ed77041 to your computer and use it in GitHub Desktop.
update ec2, install apache web server, start apache, and every time ec2 starts start apache web server, and create an index.html file with some content in the web root directory
#!/bin/bash
yum update -y
yum install httpd -y
service httpd start
chkconfig on
cd /var/www/html
echo "<html><body>us-second-server</body></html>">index.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment