Xampp on various networks

0

I'm using xampp to host a personal project, I'll explain:

Preliminary information

I have set up a web server with a bdd (mysql) to show the temperatures and processes used by the PC.
For the temperatures I use a log created by the speedfan program.
For the processes I have enabled the snmp protocol and I get them from the web

Explanation

The thing is that I've done this to load that web page in a raspberry pi 3 b that I have connected directly to the pc (the pc has two network cards, one goes to the router and another to the rpi) so if I run out of internet, the rpi can continue to record and show the data.

The thing is that in this way, I can only access this website from the rpi or from the pc itself.

QUESTION

Is there any way for xampp to display this web page on both networks?
Network rpi-pc: 192.168.1.1
Local network: 192.168.0.x

I hope you explained to me

    
asked by IXTR Unai 05.06.2018 в 18:32
source

1 answer

0

It would not be easier to connect the raspberry and the pc to the router, the two would be in the same network and you would save a network card.

All the other solutions I see more complicated, here I list some:

Your pc has to "route", to the clients that connect you have to put a static route so that they know how to get to the pc and then they know how to resend them to the RP.

Your pc can natear the ip of the RP for a port in concrete, example, the RP listens for the 80, you in the PC redirects everything that comes for the 90 to the ip of the pc to the ip of the RP through port 80.

    
answered by 28.06.2018 в 10:33