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?

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.