2

I'm trying to use my Pi as webserver and can confirm that the Apache 2 webserver is functioning properly when accessed locally. In order to allow external access, I have set up port forwarding (80 for HTTP and 22 for SSH) on my router to my Pi's internal IPs.

However when I attempt to access http://mypi.example.com, the connection simply times out. A similar problem occurs when I attempt to SSH to the Pi externally. Again from a LAN device to the internal IP, SSH works perfectly fine.

Any ideas how to resolve this issue?

  • Are you using a domain name in your URL? If so, is it properly pointing to your external IP address? If not, are you certain you are hitting the right IP? – JNevill Nov 30 '15 at 17:59
3

Make sure that the apache2 server is on port 80 and not 8080. Apache2's default is port 8080.

1

In my case it was a setting on the router/modem/gateway called "device filter" turning it off enabled the pi connections to work. When it was on I could connect through to the other machines but not the pi. Now it all works well.

0

I did this a few months ago. Apache must be set to anything but port 80. Most ISP's block port 80.

Can't remember but I think the same is true for port 22.

  • 1
    A firewall on the router or similar is more likely to be a issue - this depends on the ISP. In the UK it seems easy enough to set up externally accessible networks on a range of ISPs – Wilf Dec 3 '15 at 0:53
  • I don't think it's fair to say "most ISPs". Comcast, which is the largest in the country, doesn't. Wilf is correct, it's far more likely to be an issue with the OP's router. – Jacobm001 Dec 3 '15 at 4:14
  • I am from the U.S.A....home of the worst internet service in the developed world. I am on Charter and its blocked...my server runs on 8080 – Mr. Personality Dec 7 '15 at 2:57
0

Try typing your Pi's external IP, and not a hostname.

I hope this helps.

-Teacher of Things

http://teacherofthings.hopto.org/ - Hosted in a Raspberry Pi!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.