We are trying to use nginx as a proxy/router thing so we can redevelop parts of a large monolith web site. The idea is to have developers run nginx in a vagrant created vm that will route requests either to a new site or the original monolith. All of the sites are in windows on the host machine.
I need to setup the hosts file on the guest os so that it can route to the host machine. Currently the host web site is running on localhost and the guest os thinks that it is also on 127.0.0.1 so the routing from nginx fails.
I need to have vagrant update the guest host file with the site name and the ip of the host machine.
I see a thing called vagrant host manager but ... Im comletely confused by this network stuff.
Thanks
UPDATE: I have this in the vagrantfile to setup nginx.
config.vm.provision "shell", inline: <<-SHELL1
apt-get -y update
apt-get -y install nginx
apt-get -y install curl
SHELL1
config.vm.provision "shell", run:"always", inline: <<-SHELL2
echo "Configuring Nginx"
cp /vagrant_data/nginx.conf /etc/nginx/sites-available/nginx_vhost
ln -s /etc/nginx/sites-available/nginx_vhost /etc/nginx/sites-enabled/
rm -rf /etc/nginx/sites-available/default
service nginx restart
SHELL2
And I have the following to update my host hosts file (windows):
config.hostmanager.enabled = true
config.hostmanager.manage_host = true
config.hostmanager.manage_guest = false
config.hostmanager.ignore_private_ip = false
config.hostmanager.include_offline = true