Skip to content

Instantly share code, notes, and snippets.

@loujaybee
Last active April 19, 2020 18:30
Show Gist options
  • Save loujaybee/ef55709c3aa733a600b2d4e1fd464a2b to your computer and use it in GitHub Desktop.
Save loujaybee/ef55709c3aa733a600b2d4e1fd464a2b to your computer and use it in GitHub Desktop.
Super small script to start apache
exec > >(tee /var/log/user-data.log|logger -t user-data -s 2>/dev/console) 2>&1
echo "Started User Data"
sudo su
yum install httpd
echo "<p> Instance 2! </p>" >> /var/www/html/index.html
sudo systemctl enable httpd
sudo systemctl start httpd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment