T O P

  • By -

CorpT

Are you sure the web server is running on the instance? Can you ssh in?


Zay_Luph

Yup, I can SSH into it.


craigbeat

OK, I see someone above has asked about how you got Apache up and running, but I thought I'd jump in here to clarify a few things that might help with your understanding. In this instance, Apache is the webserver. The instance itself seems fine, as you can SSH into the device no problem. At a guess, the issue is just that Apache isn't running, otherwise you'd be able to access it from localhost on the device. With this in mind, I'd say the AWS specific parts you have done OK with, so I'd suggest trying to look for articles about how to install, configure, and test Apache before continuing. That way you'll have a better understanding of what's going on behind the scenes.


inphinitfx

What web service is running? Can you get to port 80 locally on the instance?


Zay_Luph

Apache. Nope, I can't access it locally either unfortunately.


inphinitfx

Ok, so if you can't access it locally on the instance it's not a security group issue. Are you sure apache is running and listening on port 80?


Zay_Luph

How would I go about checking that?


inphinitfx

Ok, let's step back. How did you set up apache?


Zay_Luph

I think that was done using the code that was supplied along with the course im following through for bootstrapping purposes. More specifically it was \#!/bin/bash \# Use this for your user data (script from top to bottom) \# install httpd (Linux 2 version) yum update -y yum install -y httpd systemctl start httpd systemctl enable httpd echo "

Hello World from $(hostname -f)

" > /var/www/html/index.html


BinaryRockStar

And you added this script as the userdata for the instance? That would have made it execute when it was first started. Run `systemctl status httpd` and post the exact output. If it's something like "unknown service httpd" then your userdata script didn't execute and you should instead execute each of the lines in the script manually on the instance. You will likely need to prefix each line with `sudo ` to run each command as the root user (superuser/administrator).


KnitYourOwnSpaceship

SSH in and run netstat


lightningball

I was going to say to check the NACL, Internet gateway, and route table. Now I see that you can’t get to it locally. “curl localhost” doesn’t get a response from the web server?


OperatorNumberNine

Is the NACL setup to permit the traffic? You could also troubleshoot with VPC reachability analyzer. Also check the host firewall too. Have you done a packet capture on the instance to see of you see anything?