Merge pull request #8451 from chrisroberts/enhancement/port-forward-init

Add note on forwarded_port and include host_ip configuration
This commit is contained in:
Chris Roberts 2017-04-05 15:23:29 -07:00 committed by GitHub
commit ee7a4ed652
1 changed files with 6 additions and 0 deletions

View File

@ -31,8 +31,14 @@ Vagrant.configure("2") do |config|
# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine. In the example below,
# accessing "localhost:8080" will access port 80 on the guest machine.
# NOTE: This will enable public access to the opened port
# config.vm.network "forwarded_port", guest: 80, host: 8080
# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine and only allow access
# via 127.0.0.1 to disable public access
# config.vm.network "forwarded_port", guest: 80, host: 8080, host_ip: "127.0.0.1"
# Create a private network, which allows host-only access to the machine
# using a specific IP.
# config.vm.network "private_network", ip: "192.168.33.10"