Using the mirror module

jlangr nginx-forum at forum.nginx.org
Thu Aug 9 19:14:33 UTC 2018


Thanks for the posts Kenny & pbooth.

I have this problem as well. I am running nginx 1.15 under MacOS and also
experience this under Windows.

Requests successfully go to the server specified under the location but are
not received at the proxy_pass defined in the mirror location's proxy_pass.
Switching between the two servers (swapping the mirror for the proxy_pass in
the primary location) exhibits the same problem.

My config is:
```
http {
    server {
        listen 3333;
        server_name  localhost;

        location / {
            mirror /other;
            proxy_pass http://localhost:3001;
        }

        location = /other {
            internal;
            proxy_pass http://localhost:3002;
        }
    }
}

events {
}
```
Based on your other post, it does not look like I need a resolver.

I've also tried with two servers--one localhost and one established server
on another machine.

Any help greatly appreciated!

Jeff

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,279036,280828#msg-280828



More information about the nginx mailing list