Last active
September 5, 2021 18:18
-
-
Save phillippbertram/68ac80193fbcb80d21a8ca0e2ee48625 to your computer and use it in GitHub Desktop.
Simple httpd server user data script for ec2 instances that shows the current host name
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 | |
# use this for the user data | |
yum update -y | |
yum install -y httpd | |
systemctl start httpd | |
systemctl enable httpd | |
echo "<h1>Hello from $(hostname -f)</h1>" > /var/www/html/index.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment