0

I set up a raspberry pi 4 web server in my home network. I got apache and php running on it and the website can be accessed from within the network but always fails when outside of my network.
I can access the webserver with my private, public and my web domain but only as long as the requesting host is inside my own home network.

I have port forwarding activated on my router (port 80 and port 443) but it seems like the raspberry doesnt even listen to these ports since whenever i check Port 80 (https://www.yougetsignal.com/tools/open-ports/) it says that the port is closed (shouldnt it be opened since there is a web server running there?).


I obviously can provide any information relevant to solving this problem, but right now i am unsure about whatmore i can say...
I am lost

Any Idea on what could be wrong is greatly appreciated!

4
  • Do you have a firewall somewhere blocking the traffic?
    – DavidPostill
    Commented Jul 2, 2020 at 16:43
  • @DavidPostill Im pretty sure that thats not the case or at least I wouldnt know where. Raspberrys dont have firewalls (to my knowledge) and the router forwards everything from port 80/443 to the raspberry...
    – Sokker
    Commented Jul 2, 2020 at 16:51
  • Does your ISP allow home servers? Some don't.
    – Tetsujin
    Commented Jul 2, 2020 at 17:08
  • @Tetsujin Yes they do
    – Sokker
    Commented Jul 2, 2020 at 17:53

1 Answer 1

0
  • Do you have a dynamic DNS setup? If you're accessing your webserver via the external IP directly, you may be getting an error message from Apache because there's no Host: header, which is automatically provided by the browser when you use a domain name instead of an IP. Make sure Apache has a default host set properly.

  • If you have web management enabled on your router, the webserver on the router itself may be occupying ports 80 and 443. Turn web management off or try using alternate ports as explained below.

  • Your ISP may be blocking port 80/443. Try using a port like 81, and then access your webserver through http://x.x.x.x:81 and see if it works. If this works, you'll have to use alternate ports.

  • If your "public IP" as listed in your router begins with 10.x.x.x, 172.16.x.x through 172.31.x.x, or 192.168.x.x, then you are behind a "Carrier Grade NAT" and won't be able to open ports.

2
  • My router does not have web management enabled, other ports (like 81) have the same exact problem and my public ip begins with "87.x.x.x". I havent set up a dynamic DNS yet since i wanted the website to be fundamentally working before i do so. Where can i change the "Host:" header of apache? I cant find it anywhere...
    – Sokker
    Commented Jul 2, 2020 at 17:13
  • Edit: I added default host and the problem hasnt changed a bit... Back to square 1
    – Sokker
    Commented Jul 2, 2020 at 20:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .