We are happy to announce that Vesta is back under active development as of 25 February 2024. We are working on v1 candidate and expect to engage more with the community over the coming months. We are committed to open source, and we encourage contributors to help us build the future of Vesta.
Multiple Vm
Multiple Vm
Hi!
For work I should realise a project as it follows:
Where:
A and B use ubuntu 16.04 and they both have a vestacp installed correctly.
For now, I find myself with:
A - perfectly functioning
B - not reachable [but internally functioning (something like https://192.168.1.102)]
How can I make a reverse proxy or a redirect (or... any other idea is welcome!) from A machine to B machine?
Thank you!
For work I should realise a project as it follows:
Where:
A and B use ubuntu 16.04 and they both have a vestacp installed correctly.
For now, I find myself with:
A - perfectly functioning
B - not reachable [but internally functioning (something like https://192.168.1.102)]
How can I make a reverse proxy or a redirect (or... any other idea is welcome!) from A machine to B machine?
Thank you!
-
- Posts: 35
- Joined: Fri Dec 08, 2017 3:48 pm
- Os: Debian 7x
- Web: apache + nginx
Re: Multiple Vm
Hi,
bit late to reply, but perhaps it's still relevant.
You can add an apache proxy between the router and the servers:
router (LAN): 192.168.1.1
proxy: 192.168.1.2
mysite.com: 192.168.1.101
dev.mysite.com: 192.168.1.102
On the proxy, add the following to /etc/apache2/apache2.conf:
However, I've noticed that only your default site on VestaCP can be accessed this way, since the proxy refers to IP's rather dan domain names (you could try adding hostnames in the proxypass setings, but I haven't tried that myself, yet).
This should do the trick (I'm using the same thing at home).
bit late to reply, but perhaps it's still relevant.
You can add an apache proxy between the router and the servers:
router (LAN): 192.168.1.1
proxy: 192.168.1.2
mysite.com: 192.168.1.101
dev.mysite.com: 192.168.1.102
On the proxy, add the following to /etc/apache2/apache2.conf:
Code: Select all
<VirtualHost *>
ServerName mysite.com
ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass / http://192.168.1.101/
ProxyPassReverse / http://192.168.1.101/
<Location />
Order allow,deny
Allow from all
</Location>
</VirtualHost>
<VirtualHost *>
ServerName dev.mysite.com
ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass / http://192.168.1.102/
ProxyPassReverse / http://192.168.1.102/
<Location />
Order allow,deny
Allow from all
</Location>
</VirtualHost>
This should do the trick (I'm using the same thing at home).
-
- Support team
- Posts: 1096
- Joined: Sat Sep 06, 2014 9:58 pm
- Contact:
- Os: Debian 8x
- Web: apache + nginx
Re: Multiple Vm
The question is fundamentally wrong because in the router you would "forward a port" to a specific internal IP... you cannot do this to multiple IPs.
So you either have to change VestaCP port on "B" or use the proxy pass config as Vanderheyde suggested
So you either have to change VestaCP port on "B" or use the proxy pass config as Vanderheyde suggested