0

I have a webapp that I'm testing via SSH; it's available on localhost:webappport when I'm logged into the pi. However, if I try to view the webapp by going to the pi.ip:webappport from another machine on my local network, I don't get any response.

Now, I assume this is because the pi is only making the webapp available to local resources - so how do I make the localhost traffic accessible to an external connection? I'd be happy to do this with a simple web server, or with some sort of SSH-hosted connection. Ideally, I'd like it to be a simple / straight forward process that's not terribly insecure. (While I'm only using this to test locally right now, the option to reapply what I learn here to future testing, including that not limited to the LAN would be quite helpful.)

So, what's the best way to serve localhost traffic to a direct connection (via IP) on my local network?

user3.1415927
  • 303
  • 1
  • 2
  • 14
  • 1
    Not Pi specific. There should be a better site for this question. – joan Jun 11 '18 at 22:03
  • 1
    @joan Technically neither is https://raspberrypi.stackexchange.com/questions/78364/ip-cam-and-local-network-on-different-ethernet-ports-on-raspberry-pi or https://raspberrypi.stackexchange.com/questions/84783/no-internet-connection-after-changing-mac-address/84873#84873, but they are both pi-appropriate.... – user3.1415927 Jun 11 '18 at 22:09
  • 2
    The point is that someone may answer but you are more likely to get a correct and timely answer if you ask the question on a more appropriate site. – joan Jun 11 '18 at 22:23
  • It sounds like your webapp (which we know nothing about) refuses external connections. Perhaps you should configure it to accept them? – Dmitry Grigoryev Jun 25 '18 at 10:53

1 Answers1

1

Since Raspberry Pi is a general purpose Linux computer, many web servers such as NodeJS or Apache will serve HTML and REST services just fine over your local network. Choose the web server based on your programming language preference and then follow relevant installation instructions for that web server. Once you have chosen your web server, do search for Raspberry Pi specific instructions if any.

OyaMist
  • 1,119
  • 6
  • 8