I've get an Curl error 7: Failed to connect to site1.local port 8000: Connection refused
, when i call it from another local site (site2.local). Both sites run on the same Vagrant box.
When i replace the url to an url of an external site (eg. google.com), there is no problem in connecting.
Why does vagrant refuse a call from his own? I searched the problem, but couldn't find any solution to this.
Is there a way to call to another site on the same server using curl?
edit:
Vagrantfile:
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
Homestead.configure(config, YAML::load(File.read(path + '/Homestead.yaml')))
end
Homestead.yaml
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
authorize: C:/Users/Robert/.ssh/id_rsa.pub
keys:
- C:/Users/Robert/.ssh/id_rsa
folders:
- map: A:/homestead/projects
to: /home/vagrant/projects
sites:
- map: site1.local
to: /home/vagrant/projects/work/work-site-1/public
- map: site2.local
to: /home/vagrant/projects/work/work-site-2/public