1
當我從另一個本地網站(site2.local)調用它時,我得到一個Curl error 7: Failed to connect to site1.local port 8000: Connection refused
。這兩個網站都運行在同一個Vagrant框中。使用guzzle流浪流浪捲毛錯誤7
當我將url替換爲外部網站(例如google.com)的url時,連接時沒有問題。
爲什麼流浪者會拒絕他自己的電話? 我搜索了這個問題,但找不到解決方法。
有沒有辦法使用curl在同一臺服務器上調用另一個站點?
編輯:
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
編輯vagrantfile和homestead.yaml的問題 – 2015-04-02 16:06:49