0
Uncategorized

Paste the below code in User Data while creating the Linux Server

It will install apache server and an index.html will be created.
Put the server ip address in browser, you will find the server is up and running and the index.html file will be accessable.

!/bin/bash

sudo su
yum update -y
yum install -y httpd.x86_64
systemctl start httpd.service
systemctl enable httpd.service
echo “Hello World from $(hostname -f)” > /var/www/html/index.html

Optionaly: You can use this Code to create index.html

Optionaly: You can use this Code to create index.html ——————————————————-

S3 Demo By PITC

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Posts