Skip to content

Instantly share code, notes, and snippets.

@jeffbrl
Created September 28, 2021 19:42
Show Gist options
  • Save jeffbrl/be4f5c0bbf18fb1f0644545deffef222 to your computer and use it in GitHub Desktop.
Save jeffbrl/be4f5c0bbf18fb1f0644545deffef222 to your computer and use it in GitHub Desktop.
User data for Ubuntu 20.04 Apache2 Basic HTTP Example
#!/bin/bash -xe
apt-get -y update
apt-get install -y apache2
echo `hostname` > /var/www/html/index.html
echo '<br><br>' >> /var/www/html/index.html
# create ~ 12K of random text
base64 /dev/urandom | head -c 10000 >> /var/www/html/index.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment