Server in VPN network as subdomain
I explain my setup:
- I got 2 RPi in different locations (N.B: IP may change)
- RPi hosts (at least) a webserver
- 1 droplet here, publicly accessible at (lets say) mydomain.com
I would like to be able to access the RPi "though" the droplet (kindof front node).
Now I'm wondering what I can do and what I can't, the perfect scenario would be:
- Setup a VPN on the droplet. Let say the VPN is 10.0.0.0/24, the droplet is 10.0.0.1 on that network.
- Connect both RPI to that VPN: 10.0.0.10 and 10.0.0.20
- Now, I would like serverX.mydomain.com to display my RPi webservers as http(s)://10.0.0.X0/ would do.
I've looked some Apache conf settings like Redirecting, Rewriting etc... but I'm not sure if this could do the job.
My RPI aren't connected for now so I didn't tried, but anyway the point isn't to try stuff randomly but to be sure.
Any idea, advices or docs?