"This site can’t be reached" after vagrant up on local dev box

Hi guys,

Am going to work on a client site and ran Vagrant up (the VM was in an aborted state) in the local dev project area.

The machine seems to have started okay, but when I try to visit the staging URL (which is setup in /etc/hosts) I see this error:

This site can’t be reached
www.majacmedical.dev refused to connect.

Checking the connection
Checking the proxy and the firewall

I can ping the box and the VM seems to be okay, any ideas on how to resolve? Should I do a vagrant halt and then start it up again?


I mean it’s definitely worth a shot. It’s what i would try first as basic troubleshooting.

1 Like

Also, with the latest updates to Chrome and Safari these browsers are starting to reserve the .dev TLD domain (which Google bought and now enforces https:// whenever the domain is used, because of course). It’s now recommended to use the .test TLD for your local development environments. (You’ll need to re-provision after making this change on an existing project). The latest version of trellis has this updated: https://github.com/roots/trellis/pull/923



Thanks Nick,

It seems you’re right about this… I had wondered why the protocol was changing to https.

Using Firefox I can still access the local site, but yes I guess I will need to switch to .test



Thank you. I’m up now.

For anyone else coming here:



I followed the instructions above and the site came up again after accepting the security risk but the next time I brought the Vagrant box up I was back to the same situation.

I went back through the steps just to check that the find and replace was still in place and verified that my /etc/hosts file had the new .test root domain.

Cleared the cache on the browser, but still no love.

The only thing that may be different in my situation is that I am using the newly released LTS Ubuntu 18.04 Bionic Beaver OS. (UPDATE: pulled all of the files down to attempt this with Ubuntu LTS 16 and the results were the same) Trying to visit my site at mydomain.test returns “This site can not be reached” ERR_CONNECTION_REFUSED.

I can vagrant ssh into the server as well as ping the IP

I have also disabled the firewall and now the status of ufw shows inactive.

Any ideas where to go from here??

@GhostInTheMachines you might be running into this if you created this Trellis install recently: https://github.com/roots/trellis/issues/979

If so, apply this change to your Trellis installation:

…and make sure to re-provision :slight_smile:


@ben That did the trick! re-provisioning hung up for some reason, so I had to destroy the box, re-create and re-import the database, but at least I can get back to work.

Thank you for the tip and link.

Also make sure that you have installed Sage. For some reason going through installing Sage theme components did the trick…

From the trellis setup example (https://github.com/roots/roots-example-project.com):

  1. Install theme components

@ roots-example-project.com/site/web/app/themes/sage

$ composer install
$ yarn && yarn build