V
V
voker20052019-11-05 13:25:34
Nginx
voker2005, 2019-11-05 13:25:34

How to configure Proxy_Pass in Nginx (scheme inside)?

Hello.
How to proxy a web service in Nginx , excluding the /admin/
5dc14f3f51d95968650339.jpeg
directory. If I configure it this way, it doesn’t work (because the link to pages and content changes):

location /adminka-1 {
    proxy_pass http://192.168.1.1:8080/admin/;
    proxy_http_version 1.1;
    proxy_set_header Connection 'upgrade';
    proxy_set_header Host $host;
    proxy_cache_bypass $http_upgrade;
}

We need a way that would process all VM2 dependencies in its web server, and through VM1 simply give content or somehow rewrite addresses.
And if so, then it works well, but I need through the address /adminka-1/
location /adminka-1 {
    proxy_pass http://192.168.1.1:8080/admin/;
    proxy_http_version 1.1;
    proxy_set_header Connection 'upgrade';
    proxy_set_header Host $host;
    proxy_cache_bypass $http_upgrade;
}

Please suggest an implementation, thanks.

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