A
A
Alexey2017-08-16 14:55:53
Nginx
Alexey, 2017-08-16 14:55:53

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

1 answer(s)
S
Stanislav B, 2017-08-16
@S_Borchev

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 question

Ask a Question

731 491 924 answers to any question