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:
commit
ee7a4ed652
|
@ -31,8 +31,14 @@ Vagrant.configure("2") do |config|
|
||||||
# Create a forwarded port mapping which allows access to a specific port
|
# 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,
|
# 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.
|
# 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
|
# 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
|
# Create a private network, which allows host-only access to the machine
|
||||||
# using a specific IP.
|
# using a specific IP.
|
||||||
# config.vm.network "private_network", ip: "192.168.33.10"
|
# config.vm.network "private_network", ip: "192.168.33.10"
|
||||||
|
|
Loading…
Reference in New Issue