I'm starting my virtual environment with Vagrant + VirtualBox, and I'm going to try and deploy a simple web services there.After starting Vagrant, I was able to confirm that I could access it from my local PC using the settings shown below.
When I accessed it from an external PC with the same settings, I got the following error, but do I need to set it up additionally if I access it from an external PC?
By the way, the SSH settings for Vagrant were as follows.
Note:
(1)Based on the advice you gave me, I decided that I should do port forwarding, and I have attached the results of the reboot after adding the following settings in the Vagrantfile:
config.vm.network "forwarded_port", guest:80, host:8080
(2) When I looked at the Qiita article to see if the port could be accessed from a PC in the same network, there seemed to be no problem.
When connecting from the local PC to the guest OS, 2222
is specified as the port number, but has the guest OS changed the standby port of ssh?Or are you using port forwarding?
Either way, first check to see if the 2222
port is connected to the "External PC to Local PC" (such as firewall settings on the local PC).
Also, I think it would be easier to give a more specific answer if you could add what kind of network settings the guest OS has.For example, if you are using a "host only adapter", you can only communicate between your local PC and the guest OS.
Note: Vagrant network around
© 2024 OneMinuteCode. All rights reserved.