Answer the question
In order to leave comments, you need to log in
How to set up virtual hosts to work with Vagrant?
The situation is the following. Created a virtual machine using Vagrant, installed nginx on it. I work with the site locally, the files are synchronized using the config.vm.synced_folder setting "www", "/home/vagrant/www", :create => true. In the Vagrantfile, I configured config.vm.network "forwarded_port", guest: 80, host: 8080 and at the moment the site opens in the browser from my local host at localhost:8080/. But I want to work with several sites in a virtual machine and have them accessible from the local host, for example, at the addresses mysite1.loc, mysite12.loc, etc. How can i do this?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question