V
V
Vitaly2017-07-17 21:48:43
virtual box
Vitaly, 2017-07-17 21:48:43

Why doesn't vagrant run the page in the browser?

So given:
Mac mini, Mac OS X Sierra
Mac mini is connected to the Internet via wi-fi
The nginx virtual machine itself is taken from here https://github.com/splincode/basework/tree/master/...
With vagrant up, he writes here what

This is what vagrant up says
Mini-vitaliy:nginx vitaliysborshikov$ vagrant up
Bringing machine 'nginx' up with 'virtualbox' provider...
==> nginx: Checking if box 'puphpet/ubuntu1404-x64' is up to date...
==> nginx: Machine already provisioned. Run `vagrant provision` or use the `--provision`
==> nginx: flag to force provisioning. Provisioners marked to run always will still run.
==> nginx: Running provisioner: shell...
nginx: Running: /var/folders/zj/p_77dk1x011f52syqqm96xgw0000gn/T/vagrant-shell20170717-8651-j0oc4o.sh
==> nginx: stdin: is not a tty
==> nginx: Running files in files/startup-once
==> nginx: Finished running files in files/startup-once
==> nginx: To run again, delete hashes you want rerun in /.puphpet-stuff/startup-once-ran or the whole file to rerun all
==> nginx: Running files in files/startup-always
==> nginx: Finished running files in files/startup-always
==> nginx: Running provisioner: shell...
nginx: Running: /var/folders/zj/p_77dk1x011f52syqqm96xgw0000gn/T/vagrant-shell20170717-8651-omf6t2.sh
==> nginx: Running files in files/startup-once-unprivileged
==> nginx: Finished running files in files/startup-once-unprivileged
==> nginx: To run again, delete hashes you want rerun in /.puphpet-stuff/startup-once-unprivileged-ran or the whole file to rerun all
==> nginx: Running files in files/startup-always-unprivileged
==> nginx: Finished running files in files/startup-always-unprivileged

When vagrant ssh connects, I work with a virtual machine, everything is fine, but when I enter ip 10.1.1.33 in the browser line (I changed it, it is different from what it was) I get
Can't access site
Не удается получить доступ к сайту
Сайт 10.1.1.33 не позволяет установить соединение.
Попробуйте сделать следующее:
Проверьте подключение к Интернету.
Проверьте настройки прокси-сервера и брандмауэра.
ERR_CONNECTION_REFUSED

I don't know what could be the problem, any help would be greatly appreciated!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vitaly, 2017-07-18
@Kens1n

With other virtual machines like homestead or scotchbox everything works. Therefore, I close the issue with the current configuration.

R
Roman Gritsuk, 2017-07-17
@winer

How are you setting up the network? I understand correctly that you want to run vagrant on one device and view it from another? Try using public_network .
To check on my own PC, I usually configure the network like this:

required_plugins = ["vagrant-hostmanager", "vagrant-vbguest", "vagrant-cachier"]
required_plugins.each do |plugin|
    if !Vagrant.has_plugin?(plugin) then
        system "echo Not installed required plugin: #{plugin} ..."
            system "vagrant plugin install #{plugin}"
    end
end

Vagrant.configure("2") do |config|
  #-------------------------------------
  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
  config.vm.hostname = 'test.me'
  config.vm.network :private_network, ip: '192.168.1.22'
  config.hostmanager.aliases = ['test.me', 'www.test.me']
  #-------------------------------------
end

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question