Posts: 22
Joined: Sun Jun 09, 2013 4:53 pm

External access to apache web server

Sun Jun 09, 2013 7:18 pm

I have a model B (256MB) running the latest official release of the rasbian distribution (2013-05-25) and am trying to set up an apache2 web server on it. I installed apache2 by running the following on a fresh raspbian install:

Code: Select all

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install apache2
At this point I can see the default "It works!" page if I point my laptop to my pi's IP address. The problem I am having is accessing it from outside my home network. Since my IP from my ISP is dynamic, I signed up for a free account from no-ip.com and have verified that is has my correct IP address. I then opened up port 80 TCP on my router and routed it to my pi's IP address. But when I use my no-ip address on my phone (not connected to wifi, but using my mobile data) I do not see the apache "It works!" page, instead I get a HTTP Error 503 (Service Unavailable).

I have also opened port 22 TCP&UDP on my router so that I can ssh in to my pi from outside my home network. When I use my phone to ssh in to my pi using my no-ip address it connects successfully and I can run commands normally on my pi, so this implies that my no-ip account and port forwarding is working correctly and makes me think there is something that I am missing in my apache configuration?

Does anyone have any ideas what might be wrong?

Posts: 316
Joined: Wed Dec 14, 2011 3:59 pm
Location: Wirral, UK

Re: External access to apache web server

Sun Jun 09, 2013 9:10 pm

Have you checked that your router does not have a web server running on port 80.

Posts: 22
Joined: Sun Jun 09, 2013 4:53 pm

Re: External access to apache web server

Sun Jun 09, 2013 9:31 pm

Thanks for your reply, the culprit was not my router, but my NAS box! It was using UPnP to open port 80 for its self. I disabled this and now I can see apache on my pi (although its weird that I couldn't see the NAS box admin interface before)

Posts: 12
Joined: Tue Dec 24, 2013 11:52 pm

Re: External access to apache web server

Sat Dec 28, 2013 1:41 am

I am having the same problem. I was able to install apache2 on my pi and set it up, so that when i go on my laptop or phone which is connected to the same network i was able to get to the "it works!!!!" webpage.
But when i used my phone service internet it couldn't connect. BTW i went into my router setting and opened port 80, using the port forwarding feature of my comcast xfinity router.
So what i am missing?

Posts: 1
Joined: Mon Jan 06, 2014 5:15 pm

Re: External access to apache web server

Mon Jan 06, 2014 5:19 pm

I'm having the same problem. If i access the current ip address of my router (given by no-ip) I can see my page, but it fails using the url that no-ip gives. Is this the way yours is working?

Posts: 1
Joined: Wed Mar 08, 2017 3:23 am

Re: External access to apache web server

Tue Oct 10, 2017 1:17 pm

I met the same problem. My work around is to change apache server port by modifying the file "/etc/apache2/ports.conf". Change the line "Listen 80" to "Listen 8888". Restart Raspi. Then I have to access the web with port added, http://site name or ip:8888
Seems port 80 is not opened on my router? I'm still looking for a way to access the web without adding :port after the domain name.

Posts: 1750
Joined: Sat Sep 14, 2013 9:27 am
Location: Miramar Beach, Florida

Re: External access to apache web server

Tue Oct 10, 2017 2:28 pm

Many ISPs are blocking port 80 inbound requests on residential accounts. Maybe that is your challenge.

Posts: 59
Joined: Mon May 19, 2014 3:47 pm

Re: External access to apache web server

Sun Oct 15, 2017 10:29 pm

This is a very old thread but for anyone else having this problem as SurferTim said it may be that your ISP doesn't want you doing this. My ISPs router has the screen where you can port forward but it doesn't actually port forward because the feature is actually disabled by the ISP.

So what I did was bridge the ISP router to another router I had lying around that was one I bought myself. So internet went from the ISP router to the one I bought myself and on this one I could forward any port I wanted. The second router I did the port forwarding on was not compatible with fibre internet so I wasn't able to just use it instead of the ISP router. You could instead buy your own non-ISP router but check first if it is compatible with your ISPs internet service.


Return to “Networking and servers”

Who is online

Users browsing this forum: No registered users and 12 guests