A
A
andrei_pro2019-11-30 22:35:21
Nginx
andrei_pro, 2019-11-30 22:35:21

Nginx push page to subdomain?

Hello.
There is a website site1.ru with a product catalog page: site1.ru/catalog?date_from=&date_to=
How to configure nginx to open a catalog by catalog.site1.ru?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Sokolov, 2019-11-30
@sergiks

server {
  server_name catalog.site1.ru;
  location / {
    pro xy_pass http://site1.ru/catalog?date_from=&date_to=;
  }
}

For details, see the ngx_http_pro xy_module module
(Toaster cuts any mention of xy, so with spaces)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question