I am trying to make something work but I am not sure it is even possible. Here is the rundown on the devices I have connected.
Main linux webserver – Authenticated website, controls some things, ran on device 1, IP address exposed to the internet.
2nd linux webserver – Accessed on local network only, device controls different things than the 1st. Ran on device 2.
3rd linux webserver – Once again, accessed on local network only, device controls different things than the 1st and 2nd. Ran on device 3.
Is it possible to display the webpage of the 2nd and 3rd web server via an iframe off the first main device webpage? I first thought I could do a reverse proxy but, when I followed guides on the internet, I could get the iframe to only display off the main webserver page when the client device was on the local network, otherwise it looks like the iframe is trying to connect to the ip address of the 2nd and 3rd device which is not exposed to the internet.
Would a reverse proxy be able to achieve this without exposing the other 2 devices directly to the web and I just didn’t set it up correctly? Is there another way to do this or just deal with this limitation?
Thank you!
I tried setting up a reverse proxy from this guide: https://www.digitalocean.com/community/tutorials/how-to-use-apache-as-a-reverse-proxy-with-mod_proxy-on-ubuntu-16-04 and https://www.digitalocean.com/community/tutorials/how-to-use-apache-http-server-as-reverse-proxy-using-mod_proxy-extension
2
Answers
I ended up getting it to work by editing the .conf file for the apache server and adding this to the end for each of the other 2 webservers.
‘Main linux webserver’ must be able to ping the other two servers.
The other two local servers have a unique IP address – right?
On the other two local servers you could have apache serving up web pages.
Then ‘Main linux webserver’ can then request the URL pages from other two servers to get the pages into iframes.