Nginx proxy pass: различия между версиями

Материал из noname.com.ua
Перейти к навигацииПерейти к поиску
Строка 31: Строка 31:
 
|-
 
|-
 
|
 
|
<code>/test_links</code>
+
<code>/test_links<B>/</B></code>
 
||
 
||
 
<code>/new_location</code>
 
<code>/new_location</code>
 
||
 
||
 
<PRE>
 
<PRE>
location /test_links {
+
location /test_links/ {
 
proxy_pass https://noname.com.ua/new_location;
 
proxy_pass https://noname.com.ua/new_location;
 
}
 
}

Версия 09:59, 9 июля 2024

Nginx proxy_pass

Файлы
location proxy_pass Пример конфигурации Request Received by upstream

/test_links

/new_location

location /test_links {
    proxy_pass https://noname.com.ua/new_location;
}
  • /test_links?foo=bar
  • /test_links/baz?foo=bar
  • "POST /new_location?foo=bar
  • POST /new_location/baz?foo=bar



/test_links/

/new_location

location /test_links/ {
    proxy_pass https://noname.com.ua/new_location;
}
  • /test_links?foo=bar
  • /test_links/baz?foo=bar
  • "POST /new_location?foo=bar
  • POST /new_location/baz?foo=bar



/test_links

/new_location

location /test_links {
    proxy_pass https://noname.com.ua/new_location;
}
  • /test_links?foo=bar
  • /test_links/baz?foo=bar
  • "POST /new_location?foo=bar
  • POST /new_location/baz?foo=bar



/test_links

/new_location

location /test_links {
    proxy_pass https://noname.com.ua/new_location;
}
  • /test_links?foo=bar
  • /test_links/baz?foo=bar
  • "POST /new_location?foo=bar
  • POST /new_location/baz?foo=bar




/test_links

/new_location

location /test_links {
    proxy_pass https://noname.com.ua/new_location;
}
  • /test_links?foo=bar
  • /test_links/baz?foo=bar
  • "POST /new_location?foo=bar
  • POST /new_location/baz?foo=bar