![](https://it-infrastructure.solutions/content/images/2021/08/under_construction.jpg)
This article has not been completed yet. However, it may already contain helpful information and therefore it has been published at this stage.
![](https://it-infrastructure.solutions/content/images/2021/09/image-185.png)
![](https://it-infrastructure.solutions/content/images/2021/09/image-205.png)
![](https://it-infrastructure.solutions/content/images/2021/09/image-207.png)
![](https://it-infrastructure.solutions/content/images/2021/09/image-208.png)
![](https://it-infrastructure.solutions/content/images/2021/09/image-209.png)
![](https://it-infrastructure.solutions/content/images/2021/09/image-210.png)
![](https://it-infrastructure.solutions/content/images/2021/09/image-186.png)
![](https://it-infrastructure.solutions/content/images/2021/09/image-187.png)
![](https://it-infrastructure.solutions/content/images/2021/09/image-211.png)
![](https://it-infrastructure.solutions/content/images/2021/09/image-212.png)
![](https://it-infrastructure.solutions/content/images/2021/09/image-213.png)
![](https://it-infrastructure.solutions/content/images/2021/09/image-214.png)
![](https://it-infrastructure.solutions/content/images/2021/09/image-215.png)
![](https://it-infrastructure.solutions/content/images/2021/09/image-216.png)
![](https://it-infrastructure.solutions/content/images/2021/09/image-217.png)
![](https://it-infrastructure.solutions/content/images/2021/09/image-218.png)
![](https://it-infrastructure.solutions/content/images/2021/09/image-180.png)
https://it-infrastructure.solutions/spinning-up-your-first-ec2-instance-aws/
![](https://it-infrastructure.solutions/content/images/2021/09/image-202.png)
Add the following "User data" commands ....
#!/bin/bash
yum install httpd -y
rm /var/www/html/index.html
touch /var/www/html/index.html
echo "<!DOCTYPE html>" > /var/www/html/index.html
echo "<html>" >> /var/www/html/index.html
echo "<title>" >> /var/www/html/index.html
echo "Page 1" >> /var/www/html/index.html
echo "</title>" >> /var/www/html/index.html
echo "Hello World!" >> /var/www/html/index.html
echo "</html>" >> /var/www/html/index.html
service httpd start
![](https://it-infrastructure.solutions/content/images/2021/09/image-196.png)
![](https://it-infrastructure.solutions/content/images/2021/09/image-219.png)
![](https://it-infrastructure.solutions/content/images/2021/09/image-220.png)
![](https://it-infrastructure.solutions/content/images/2021/09/image-221.png)
#!/bin/bash
yum install httpd -y
rm /var/www/html/index.html
touch /var/www/html/index.html
echo "<!DOCTYPE html>" > /var/www/html/index.html
echo "<html>" >> /var/www/html/index.html
echo "<title>" >> /var/www/html/index.html
echo "Page 2" >> /var/www/html/index.html
echo "</title>" >> /var/www/html/index.html
echo "Hello World!" >> /var/www/html/index.html
echo "</html>" >> /var/www/html/index.html
service httpd start
![](https://it-infrastructure.solutions/content/images/2021/09/image-203.png)
#!/bin/bash
yum install httpd -y
rm /var/www/html/index.html
touch /var/www/html/index.html
echo "<!DOCTYPE html>" > /var/www/html/index.html
echo "<html>" >> /var/www/html/index.html
echo "<title>" >> /var/www/html/index.html
echo "Page 3" >> /var/www/html/index.html
echo "</title>" >> /var/www/html/index.html
echo "Hello World!" >> /var/www/html/index.html
echo "</html>" >> /var/www/html/index.html
service httpd start
![](https://it-infrastructure.solutions/content/images/2021/09/image-178.png)
![](https://it-infrastructure.solutions/content/images/2021/09/image-222.png)
![](https://it-infrastructure.solutions/content/images/2021/09/image-179.png)
![](https://it-infrastructure.solutions/content/images/2021/09/image-181.png)
![](https://it-infrastructure.solutions/content/images/2021/09/image-182.png)
![](https://it-infrastructure.solutions/content/images/2021/09/image-223.png)
![](https://it-infrastructure.solutions/content/images/2021/09/image-224.png)
![](https://it-infrastructure.solutions/content/images/2021/09/image-225.png)
![](https://it-infrastructure.solutions/content/images/2021/09/image-226.png)
![](https://it-infrastructure.solutions/content/images/2021/09/image-227.png)
![](https://it-infrastructure.solutions/content/images/2021/09/image-228.png)
![](https://it-infrastructure.solutions/content/images/2021/09/image-231.png)
![](https://it-infrastructure.solutions/content/images/2021/09/image-230.png)
![](https://it-infrastructure.solutions/content/images/2021/09/image-232.png)
![](https://it-infrastructure.solutions/content/images/2021/09/image-233.png)
![](https://it-infrastructure.solutions/content/images/2021/09/image-234.png)
Result:
Refresh the page to see the result from the beginning...
![](https://it-infrastructure.solutions/content/images/2021/09/Result.gif)