Welcome! Log In Create A New Profile

Advanced

Re: Using the mirror module

Roman Arutyunyan
March 13, 2018 05:36PM
Hi Kenny,

On Tue, Mar 13, 2018 at 05:37:52PM -0300, Kenny Meyer wrote:
> Hi,
>
> I’m having trouble using the new mirror module. I want to mirror incoming requests from Nginx to other upstream servers. 1) a production server 2) a staging server
>
> This is my config:
>
> server {
> listen 80 default_server;
> listen [::]:80 default_server;
>
> location / {
> mirror /mirror;
> proxy_pass http://www.example.com;
> }
>
> location /mirror {
> internal;
> proxy_pass http://staging.example.com$request_uri;
> }
> }
>
> So, I request http://myserver.com (where Nginx is hosted) and it successfully redirects me to www.example.com, however I don’t see any requests hitting staging.example.com.
>
> What could be the error?

The configuration looks fine.
Are there any errors in error.log?
And what happens if you switch www.example.com and staging.example.com?

--
Roman Arutyunyan
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Using the mirror module

Kenny Meyer March 13, 2018 04:40PM

Re: Using the mirror module

Roman Arutyunyan March 13, 2018 05:36PM

Re: Using the mirror module

Kenny Meyer March 13, 2018 06:06PM

Re: Using the mirror module

pbooth March 13, 2018 06:32PM

Re: Using the mirror module

Roman Arutyunyan March 13, 2018 06:38PM

Re: Using the mirror module

Kenny Meyer March 14, 2018 07:58AM

Re: Using the mirror module

Roman Arutyunyan March 14, 2018 08:34AM

Re: Using the mirror module

pbooth March 14, 2018 08:32AM

Re: Using the mirror module

jlangr August 09, 2018 03:14PM

Re: Using the mirror module

jlangr August 09, 2018 05:08PM

Re: Using the mirror module

Francis Daly August 09, 2018 06:30PM

Re: Using the mirror module

jlangr August 09, 2018 07:04PM

Re: Using the mirror module

jlangr August 09, 2018 07:05PM

Re: Using the mirror module

Francis Daly August 14, 2018 03:46AM

Re: Using the mirror module

jlangr August 14, 2018 10:02AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 72
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready