AWS Solutions Architect Associate – quick webserver setup on public ec2 instance

  1. Assuming EC2 already setup and publicly accessible
  2. Add rules to Security Group assigned to EC2 – that allows http traffic  inbound  port 80 and ssh port 22- can only allow myIP if testing – now save
  3. SSH into public EC2 that you want the webserver on
  4. sudo yum install httpd
  5. systemctl enable httpd
  6. systemctl start httpd
  7. echo “Hello World” > /var/www/html/index.html
  8. test from public web browser: http://public-hostname-or-ip/

 

Leave a Comment

Scroll to Top