Skip to content

Instantly share code, notes, and snippets.

@snallami
Last active March 19, 2023 22:02
Show Gist options
  • Save snallami/bd58ecf0f1a512c610841735e22382c8 to your computer and use it in GitHub Desktop.
Save snallami/bd58ecf0f1a512c610841735e22382c8 to your computer and use it in GitHub Desktop.
start httpd server from AWS user data
#!/bin/bash
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