Answer the question
In order to leave comments, you need to log in
How to create subdomains when using Vagrant?
I use Vagrant (scotch/box) as my environment. There was a need to implement such routing:
/project_folder/app => app.example.com
/project_folder/api => api.example.com
Answer the question
In order to leave comments, you need to log in
Nothing complicated, you just need to firstly change the port mapping to 80 for http on Virtualbox, and secondly, in your hosts file for your ip, the address at which you connect to the box, register all your domains, and in turn on the http virtual machine -server must handle virtual servers, i.e. that side must also be configured.
UPD: By the way, I read about your box, it turns out that everything is described in detail about multidomains: https://scotch.io/bar-talk/announcing-scotch-box-2...
Read the documentation.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question