Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Install nginx on Amazon Linux 2
#!/bin/bash -xe
yum update -y
amazon-linux-extras install nginx1 -y
cd /usr/share/nginx/html
echo "WebServer on instance-id " > index.html
curl http://169.254.169.254/latest/meta-data/instance-id >> index.html
systemctl start nginx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment