Answer the question
In order to leave comments, you need to log in
How to make dynamic subdomains locally on Nginx + PHP-FPM?
Good afternoon! To test the application, it was necessary to locally create subdomains for a site like
test1.domain.ru test2.domain.ru, etc.
All links must lead to the same root folder, and I will separate them using Laravel framework's routes. Tell me how to implement? On VDS, I succeeded by simply registering server_name domain.ru *.domain.ru
and specifying an entry in the DNS settings А *.domain.ru
. But on the local computer, I can’t understand how this is done ... Googling did not lead to a result.
Operating system Ubuntu 16.04
Thank you all in advance for any help!)
Answer the question
In order to leave comments, you need to log in
The easiest thing for a local computer is to add test1.domain.ru, test2.domain.ru, etc. in /etc/hosts
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question