Solucionado (ver solução)
Solucionado
(ver solução)
1
resposta

vagrant ubuntu bionic não conecta na porta 80

Boa noite

Recentemente criei o vagrantfile apontando para o bionic64, após importar a vm fui realizar o teste em localhost mas estou tendo uma resposta de erro Failed to connect to localhost port 80: Connection refused

vagrant up

C:\alura_dev\bionic>vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'ubuntu/bionic64' version '20210928.0.0' is up to date...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
==> default: Forwarding ports...
    default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 127.0.0.1:2222
    default: SSH username: vagrant
    default: SSH auth method: private key
    default: Warning: Connection aborted. Retrying...
    default: Warning: Connection reset. Retrying...
    default: Warning: Remote connection disconnect. Retrying...
    default: Warning: Connection aborted. Retrying...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
    default: The guest additions on this VM do not match the installed version of
    default: VirtualBox! In most cases this is fine, but in rare cases it can
    default: prevent things such as shared folders from working properly. If you see
    default: shared folder errors, please make sure the guest additions within the
    default: virtual machine match the version of VirtualBox you have installed on
    default: your host and reload your VM.
    default:
    default: Guest Additions Version: 5.2.42
    default: VirtualBox Version: 6.1
==> default: Mounting shared folders...
    default: /vagrant => C:/alura_dev/bionic
==> default: Machine already provisioned. Run `vagrant provision` or use the `--provision`
==> default: flag to force provisioning. Provisioners marked to run always will still run.

conectei na maquina e em seguida usei o netstat -lntp

netstat -lntp

vagrant@ubuntu-bionic:~$ netstat -lntp
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      -
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      -
tcp6       0      0 :::22                   :::*                    LISTEN      -

e a maquina não gerou uma conexão tcp na porta 80 que esta resultando na falha do curl

vagrant@ubuntu-bionic:~$ curl http://localhost
curl: (7) Failed to connect to localhost port 80: Connection refused

não sei dizer do porque esta dando problema nessa porta poderiam me ajudar? desde ja agradeço!

1 resposta
solução!

gente eu que fiz besteira :/ tinha esquecido de baixar o nginx