Web Server On Ec2

[Solved] Web Server On Ec2 | Shell - Code Explorer | yomemimo.com
Question : web server on ec2

Answered by : hastings-keith-a7mjro0pk295

Step 1 : sudo yum install -y httpd
Step 2 : chkconfig httpd on
Step 3 : curl http://169.254.169.254/latest/meta-data/instance-id > /var/www/html/index.html
Step 4 : service httpd start
Step 3 is optional, it just adds the instance id to the html file.
Don't forget to also open port http:80 on your security groups

Source : | Last Update : Sun, 21 Nov 21

Answers related to web server on ec2

Code Explorer Popular Question For Shell