I am having trouble accessing my site after setting up everything with Trellis and running vagrant up

After running vagrant up, it is showing that my Trellis Vagrant box is ready to use.

My VirtualBox is showing the address that I have setup in wordpress_sites.yml canonical, however when I try to access it, it is not reachable.

I am on Windows 10 if that helps.

Any idea where I should be looking?

The name in VirtualBox is just a friendly name; it doesn’t mean that your HOSTS file was set up correctly.

Are you able to ssh to the virtual machine with vagrant ssh? Can you ping it by name?

Did you follow the specific instructions for Windows in the documentation?

Yes, I am able to ssh to the virtual machine with vagrant ssh, and I am able to ping it by name.

Through vagrant ssh, if I navigate to /srv/www I can actually see my site folder.

I pinged it by name and all packets were sent and received.

I followed the instructions from a couple Youtube tutorials, and by this point they simply navigate to the site and it works, while mine is unreachable. ie. https://www.youtube.com/watch?v=E8lRan53Zgo

I have checked the documentation, nothing in particular that jumps out to me as the problem.

thanks MWDelaney

Have you tried running:
sudo service nginx status
sudo service php7.1-fpm status

…while in vagrant ssh?
Also, have you enabled ssl in wordpress_sites.yml, if so, have you tried https:// ?


I just tried running the 2 commands in vagrant ssh, these are the result (both active and running)

I tried switching ssl to true in wordpress_sites.yml after your comment and ran vagrant provision, then tried https:// (which chrome was doing by default before turning on ssl), chrome is giving me the error that it is unsave (something to do with hsts connection)

So I googled the error and landed here: https://stackoverflow.com/questions/33268264/chromethe-website-uses-hsts-network-errors-this-page-will-probably-work-late/38881582

I tried one of the solution - to type badidea on the screen, and now it works!

It seems to be working now, and I am happy for that, but I am not sure if this is supposed to be the final solution.

anyway thanks Ivan!

Yeah it’s usually more trouble than it’s worth to do https locally for development. I recommend for future projects using the .test TLD and not using https because part of your problem is that Chrome forces .dev over https, and also assumes .dev exists out on the internet rather than locally. These facts compound your problem and it’s hard to narrow down which parts are caused by what.

So following the Trellis example of .test and not using https for development will help next time!

1 Like