The nginx configuration path points to an external chain

what I want to achieve is:

add a path to the nginx, for example: / test, and then point to http://www.baidu.com. Note: it is not a redirection

.

phenomena after configuration

browser visit: http://myhost/test, what you see in the browser is the content of baidu

Thank you!

May.05,2021

location /test/ {
    proxy_pass http://www.baidu.com/;
}

this is called reverse proxy . For more settings, you can search

.
Menu