B
B
BloodVIRUS2016-12-26 18:20:24
Nginx
BloodVIRUS, 2016-12-26 18:20:24

How to make a regular expression for nginx?

Hello. There was a need to start up all sites of one subdomain on a separate config. Now I have a universal config: pastebin.com/HyvcZ6by
I need all domains to be further processed by this config (there can be both 2nd and 3rd level domains), but site.ru subdomains are processed differently. I know that I need to create another server directive, but I can't figure out what regular expression should be in it..
Thank you!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Arman, 2016-12-26
@Arik

for the new server to specify?
server_name *.site.ru;

N
Nurlan, 2016-12-27
@daager

We just solved the question about nginx with a regular program, it should help you: https://toster.ru/answer?answer_id=937932

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question