Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

wg's avatar
Level 3

Connect between multiple boxes

Hi there,

I have laravel and homestead running on one virtual machine. I am using the default ip configuration, so my site is running at 192.168.10.10. Now I needed to install another vm and used the scotchbox to use apache. This box runs at 192.168.33.10. Everything is working just fine, but now I need to connect those two. I want to use a curl request from my scotchbox to access an api on homestead. I tried using the hostname from my host file, which isn't working. And trying to curl to 192.168.10.10 from within the scotchbox is giving me a 403.

Any suggestions on how to do that?

0 likes
3 replies
Reached's avatar

I think you would have to use something like Vagrant share for this, and then share each box to the internet

wg's avatar
Level 3

Thanks for your reply. I found some more posts, which kinda deal with the same situation:

stackoverflow

And there is a plugin, that seems to deal with this issue:

Host Manager

But I'm not sure, which approach to take, or if setting a public network in vagrant is the answer. Have you tried vagrant share before? I read about it, but I thought, it was just too much for connecting to local vms...

Reached's avatar

I used it once before, I had to create a server that was using a simple API, so i shared it using Vagrant share, then my other project could use the API endpoints, maybe it's not what you need though :)

Please or to participate in this conversation.