I’m getting a ‘Site can’t be reached” page when I go to my local test site,
i made all guideline from her https://github.com/roots/trellis
until Local development setup when I Run vagrant up
all is good and fine and the Virtual Box is running my binafsaj.test when i try to open it from chrome and all browsers I’m getting a ‘Site can’t be reached” page!
This is from terminal: when I Run vagrant up
:
==> default: Checking if box 'bento/ubuntu-18.04' is up to date...
==> default: [vagrant-hostmanager:guests] Updating hosts file on active guest virtual machines...
==> default: [vagrant-hostmanager:host] Updating hosts file on your workstation (password may be required)...
==> default: Machine already provisioned. Run `vagrant provision` or use the `--provision`
==> default: flag to force provisioning. Provisioners marked to run always will still run.
==> default: Running triggers after up ...
==> default: Running trigger...
==> default: Adding vagrant ssh-config for binafsaj.test to ~/.ssh/config
==> default: Machine 'default' has a post `vagrant up` message. This is a message
==> default: from the creator of the Vagrantfile, and not from Vagrant itself:
==> default:
==> default: Your Trellis Vagrant box is ready to use!
==> default: * Composer and WP-CLI commands need to be run on the virtual machine
==> default: for any post-provision modifications.
==> default: * You can SSH into the machine with `vagrant ssh`.
==> default: * Then navigate to your WordPress sites at `/srv/www`
==> default: or to your Trellis files at `/home/vagrant/trellis`.
------
I searched here
https://discourse.roots.io/search?q=Site%20can’t%20be%20reached
I didn’t find a solution until this topic
Http does not redirect to https only at the first access
I try this command:
ansible-playbook server.yml -e env=development
and this is the result:
$ ansible-playbook server.yml -e env=development
PLAY [Ensure necessary variables are defined] **********************************
TASK [Ensure environment is defined] *******************************************
skipping: [localhost]
PLAY [Test Connection and Determine Remote User] *******************************
TASK [connection : Require manual definition of remote-user] *******************
skipping: [xxx.xxx.xx.5]
TASK [connection : Specify preferred HostKeyAlgorithms for unknown hosts] ******
ok: [[xxx.xxx.xx.5]
TASK [connection : Check whether Ansible can connect as root] ******************
ok: [[xxx.xxx.xx.5 -> localhost]
TASK [connection : Warn about change in host keys] *****************************
skipping: [[xxx.xxx.xx.5]
TASK [connection : Set remote user for each host] ******************************
ok: [[xxx.xxx.xx.5]
TASK [connection : Announce which user was selected] ***************************
Note: Ansible will attempt connections as user = ohoudalawad
Note: The host `[xxx.xxx.xx.5` was not detected in known_hosts
so Trellis prompted the host to offer a key type that will work with
the stronger key types Trellis configures on the server. This avoids future
connection failures due to changed host keys. Trellis used this SSH option:
-o HostKeyAlgorithms=ssh-ed25519-cert-v01@openssh.com,ssh-rsa-
cert-v01@openssh.com,ssh-ed25519,ssh-rsa
To prevent Trellis from ever using this SSH option, add this to group_vars:
dynamic_host_key_algorithms: false
ok: [[xxx.xxx.xx.5]
TASK [connection : Load become password] ***************************************
ok: [[xxx.xxx.xx.5]
PLAY [Set ansible_python_interpreter] ******************************************
TASK [python_interpreter : Get Ubuntu release] *********************************
System info:
Ansible 2.7.5; Darwin
Trellis version (per changelog): "Add Python 2 explicitly"
---------------------------------------------------
non-zero return code
sudo: a password is required
fatal: [xxx.xxx.xx.5]: FAILED! => {"changed": false, "rc": 1, "stderr_lines": ["sudo: a password is required"], "stdout": "", "stdout_lines": []}
to retry, use: --limit @/Users/ohoudalawad/sites/binafsaj.com/trellis/server.retry
PLAY RECAP *********************************************************************
xxx.xxx.xx.5 : ok=5 changed=0 unreachable=0 failed=1
localhost : ok=0 changed=0 unreachable=0 failed=0
-----------
I don’t understand is this is the problem?! and how can i solve it?