R
R
rootya8022019-09-24 22:17:35
Nginx
rootya802, 2019-09-24 22:17:35

How to make auto-subdomains work in the root folder of a domain?

The bottom line is, there is site.com, you need *city*.site.com to go to the same directory as site.com.
That is: site.com -> /var/www/www-root/data/www/site.com | msk.site.com -> /var/www/www-root/data/www/site.com | spb.site.com -> /var/www/www-root/data/www/site.com | ekb.site.com -> /var/www/www-root/data/www/site.com | ..... etc.
Content generation on each subdomain is already done by cms. The question arose from the transfer of the project to your machine from third-party developers. CMS is unpopular, there is no proper documentation on this particular issue.
Machine config - VDS with Debian-9, ispmgr5 lite, apache2, nginx

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Randewoo, 2019-09-24
@rootya802

server_name *.site.ru

S
Sunflowerz, 2019-09-24
@Sunflowerz

symbolic links

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question