discozone
Posts: 8
Joined: Sun Feb 07, 2016 9:25 pm

Can't access to Rpi apache2 web server

Tue Apr 26, 2016 7:39 pm

Hi everyone,

I'm trying to set up a little apache web server on my Rpi 2 but I don't know why I can't access it with the domain name.

Here are the steps I followed :

1) Give my Rpi a static IP
2) Open ports 80 and 443 on my router (ISP was blocking them)
3) Set up port forwarding of ports 80 and 443 to my raspberry
4) Create a domain name on www.noip.com
5) Install the no-ip DUC on my Rpi so everytime I connect it to the internet it updates the domain name with the new IP adress of my router

I did some few tests to ensure that everything was okay, like a port scanning (it says XX.XX.XX.XX is responding on port 80 (http))
I also did a dnslookup and again the domain name is correctly linked to my router's ip adress.

As a beginner I am totally clueless now, any help would be very welcome !

Thank you !

Hagar
Posts: 22
Joined: Thu Feb 25, 2016 9:34 pm

Re: Can't access to Rpi apache2 web server

Tue Apr 26, 2016 9:47 pm

What do you get when you go to your website? Do you get the admin page of the router or do you get a 404 page?

discozone
Posts: 8
Joined: Sun Feb 07, 2016 9:25 pm

Re: Can't access to Rpi apache2 web server

Tue Apr 26, 2016 9:59 pm

When I access it from the internal IP address it works perfectly, but from the domain I get a ERR_CONNECTION_TIMED_OUT (on chrome)

Hagar
Posts: 22
Joined: Thu Feb 25, 2016 9:34 pm

Re: Can't access to Rpi apache2 web server

Tue Apr 26, 2016 10:07 pm

Its not really my area but if it was me i would try and break the system down to see where the fault lie, so first of all is your url pointing to your router? Try turning of the port forwarding and see if you get as far as the router, you would see the admin login page. If that works then everything outside your network is set up correctly.

asandford
Posts: 1998
Joined: Mon Dec 31, 2012 12:54 pm
Location: Waterlooville

Re: Can't access to Rpi apache2 web server

Tue Apr 26, 2016 10:13 pm

discozone wrote:When I access it from the internal IP address it works perfectly, but from the domain I get a ERR_CONNECTION_TIMED_OUT (on chrome)
Does it work from another machine on the same network?

Hagar
Posts: 22
Joined: Thu Feb 25, 2016 9:34 pm

Re: Can't access to Rpi apache2 web server

Tue Apr 26, 2016 10:17 pm

If your url is working to the router and you can still get to your website on your network then the issue is probably the port forwarding. Check you've set it ok and saved the settings on the router.

discozone
Posts: 8
Joined: Sun Feb 07, 2016 9:25 pm

Re: Can't access to Rpi apache2 web server

Wed Apr 27, 2016 12:41 pm

Hey,

So yes, the internal IP works for every machine on the network (I can access it with my smartphone)

I am 99% sure that the port forwarding is set up correctly on my router. At least it is set, but is there any way to see if the forwarding actually works ?

Thanks

Hagar
Posts: 22
Joined: Thu Feb 25, 2016 9:34 pm

Re: Can't access to Rpi apache2 web server

Wed Apr 27, 2016 10:36 pm

Have you tried a port forwarding check eg http://www.canyouseeme.org

Your ISP may be blocking it?

discozone
Posts: 8
Joined: Sun Feb 07, 2016 9:25 pm

Re: Can't access to Rpi apache2 web server

Thu Apr 28, 2016 6:29 am

It says :
Success: I can see your service on xx.xx.xx.xx on port (80)
Your ISP is not blocking port 80

My isp was blocking the ports but I opened them

ghans
Posts: 7882
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Can't access to Rpi apache2 web server

Thu Apr 28, 2016 7:46 am

Minor correction : If your ISP were to block ports ,
changing settings inside your router would not
have made any difference. Therefore i conclude your
ISP does not block ports.

Note that portforwarding rules are deliberate exceptions to
the default blocking that is normally performed by consumer
routers inside customers homes - that is the
definition of the term itself (at least in this context).

Can you check your website from another network
(Smartphone+3G or Public WiFi) ?


ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

discozone
Posts: 8
Joined: Sun Feb 07, 2016 9:25 pm

Re: Can't access to Rpi apache2 web server

Thu Apr 28, 2016 8:29 am

I just tested it again and I don't know why but it works.

The problem was probably that I did not wait long enough and the DNS servers didn't have to time to update their tables...

Thanks everyone who helped me on this,
Have a great day !

Return to “Beginners”