M
M
Mikhail Rybakov2016-12-03 14:16:17
Apache HTTP Server
Mikhail Rybakov, 2016-12-03 14:16:17

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

1 answer(s)
A
Arseny Sokolov, 2017-02-16
@ArsenBespalov

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 question

Ask a Question

731 491 924 answers to any question