A
A
Alghazanth2016-07-15 12:51:42
Nginx
Alghazanth, 2016-07-15 12:51:42

How to properly configure proxy_pass in conjunction with rewrite?

There is an example.com domain. Nginx proxies all requests to it to the backend as follows: pastebin.com/wsQXD4QA
You need to somehow configure the redirect so that requests to *.example.com are redirected to example.com/path/*, and to *.*.example .com to example.com/path/*/path2/* respectively. At the same time, so that the current redirect rule works. Is there any regexp that matches the task?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question