0

I am trying to host a website using a raspberry pi and nginx. I have everything set up, and can even access my website while directly linked to my lan. I cannot, however, access it outside my network. I've read through many many tutorials and forums, but have yet to find any help. I can show you any files you request. The site is http://www.thomaswurdinger.com .

4
  • I see that thomaswurdinger.com resolves to 162.255.119.254 by using nslookup. However once reached the website is directing to a LAN IP address of 192.168.0.10:8001 Commented May 4, 2015 at 2:04
  • Thank you for giving this a look! I'll admit to being a neophyte here. How can I get thomaswurdinger.com to resolve to the correct ip, or vice versa. (change the ip to 162.255.119.254)?
    – user443613
    Commented May 4, 2015 at 2:13
  • The 192.168.x.x address space is reserved for private networks. The solution depends on which web serve you have installed and how it is configured. When people type in thomaswurdinger.com you want their machines to go to the 162.255.119.254 address and you want the machine there to not redirect their traffic elsewhere. Commented May 4, 2015 at 2:16
  • o.k. This is a private network that I'm trying to host from. And I'm using nginx on my raspberry pi. If I changed the ip address of the pi to 162.255.119.254, would that accomplish this task?
    – user443613
    Commented May 4, 2015 at 2:50

1 Answer 1

1

You need to forward port 80 to the Raspberry Pi at the router. This tells the router that any client connecting to 162.255.119.254:80 (the default http port) should be redirected to the corresponding port on 192.168.0.10 (in this case, 8001).

Depending on the brand of your router, the option to forward ports may be listed as "Forwarding", "Virtual Servers", or another. Find your brand (and possibly model) of router on Google, and try to get a manual for it, which will have the instructions to forward ports. After setting up your ports, you may want to use a utility such as CanYouSeeMe to check that the port is connectible.

Finally, make sure that http://www.thomaswurdinger.com resolves to your external address (162.255.119.254), and you should be good to go!

You must log in to answer this question.

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