简体   繁体   中英

Can ping ec2 server (ubuntu/apache) but don't get response from http request

Background:

  • OS: ubuntu
  • Web Server: apache2

What works:

  • I can ping the server's elastic IP (and receive a response)
  • I can ssh into the server

What doesn't work:

  • I cannot get any sort of http response from the server

Expected Behavior:

Actual Behavior:

Rant:

Clearly the server is there because I can ssh in to that exact address and I can ping that exact IP and get a response. But when I go that exact address in my web browser it's as if it never makes it to the server. Or it's as if Amazon isn't letting http requests through, but in my security group I am clearly specifying that http requests from all sources are allowed through. Apache is definitely running, my document root is definitely set up properly, and my error and access logs don't give me anything.

Is there any sort of log in between Amazon and the server, or in between requests making it to the server and being received by Apache that would specify why it's returning "not found" rather than a 404. Can I make my Apache logs more verbose?

Thanks in advance! I've spent hours on this....

原来apache设置为侦听端口8080而不是端口80,因此,如果遇到此问题,请尝试查看apache侦听的内容。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM