How to Boot an EC2 with a WebServer Setup

Create a new AWS EC2 instance, and set the User Script to the following:

#!/bin/bash sudo su yum update -y yum install -y httpd.x86_64 systemctl start httpd.service systemctl enable httpd.service echo "<h1>Serving from <u style='color:red'>$(hostname -f)</u></h1>" > /var/www/html/index.html
Code language: Bash (bash)
Tags:
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments