Hello,

Vagrant doesn't do the host (windows?) update, but you an do the port thing

You can use fwd port OR you can add a host only ip OR you can add a bridge ip

That or is an inclusive OR, that mean you can do all/some/one of them

For forward port in the vagrant host you add:
https://docs.vagrantup.com/v2/networking/forwarded_ports.html

 config.vm.network "forwarded_port", guest: 80, host: 8080


For host only IP, that is a IP in a network that will be known to your
host and the VMs in that network you can use:
https://docs.vagrantup.com/v2/networking/private_network.html

 config.vm.network "private_network", ip: "192.168.50.4"

For a bridge IP that is an IP in the same network local to your host
so other machines from the local network or your host, or any other
guest/vm in the local network can connect:

https://docs.vagrantup.com/v2/networking/public_network.html

config.vm.network "public_network", ip: "192.168.0.17"


In the last 2, you need to ensure:

A. The Guest firewall allow access to your port
B. The application you want to test is binding to all the IP/Interface over IPV4

Let me know if you need more information, or the urls are good
starting point to get you started.

After you modify the Vagrantfile, I would suggest do vagrant reload,
and then ping the ip you did share to the host only/bridge ip

Alvaro

On Fri, Jun 26, 2015 at 4:31 AM, Jake Wilson <[email protected]> wrote:
> I'm new to using Vagrant and got a question about forwarded ports. In my
> vagrant instance, I have a number of different websites that I am
> developing. Not just a single site. I would prefer to access these sites in
> the browser using host definitions instead of http://localhost:8080.
>
> So for example, in my Vagrantfile I set my guest machine to have a
> particular ip, i just randomly chose 192.168.0.150. Next on my host machine,
> I edited my hosts file (I'm using Windows 7) to point my development domain
> names to my guest machine:
>
> 192.168.0.150   website1.local website2.local website3.local
>
> So now, do I HAVE to use the port forwarding? I would prefer to access my
> local dev websites in the browser using just "http://website1.local"; instead
> of "http://website1.local:8080";.
>
> How do I achieve this? Do I forward a port from 80 to 80? Or do I disable
> port forwarding all together? Is this a common approach to developing on
> multiple sites in a single vagrant environment?
>
>
> --
> This mailing list is governed under the HashiCorp Community Guidelines -
> https://www.hashicorp.com/community-guidelines.html. Behavior in violation
> of those guidelines may result in your removal from this mailing list.
>
> GitHub Issues: https://github.com/mitchellh/vagrant/issues
> IRC: #vagrant on Freenode
> ---
> You received this message because you are subscribed to the Google Groups
> "Vagrant" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/vagrant-up/57e0253e-2812-469f-9016-d5e8ba9eef28%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vagrant-up/CAHqq0exGPFXAehs96gtSWEzS-9juXJQRja-ZMrifcdqk_vhfWg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to