Created
January 27, 2019 16:26
-
-
Save mikepfeiffer/f1e2394e2952096848c496b0f86e260a to your computer and use it in GitHub Desktop.
EC2 Bootstrap Script for Apache v2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
yum update -y | |
yum install -y httpd | |
instanceId=$(curl http://169.254.169.254/latest/meta-data/instance-id) | |
echo "<h1>Hello World from $instanceId</h1>" > /var/www/html/index.html | |
systemctl start httpd | |
systemctl enable httpd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment