Re: Using the mirror module

2018-08-14 Thread jlangr
thanks Francis for the additional info, very helpful! Posted at Nginx Forum: https://forum.nginx.org/read.php?2,279036,280872#msg-280872 ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx

Re: Using the mirror module

2018-08-14 Thread Francis Daly
On Thu, Aug 09, 2018 at 07:04:50PM -0400, jlangr wrote: Hi there, > We got this working to wrap up the day. Good that you have something working for you. > My ignorance of nginx meant that I > was interpreting the example literally--I viewed the "/mirror" as the name > for the internal route, b

Re: Using the mirror module

2018-08-09 Thread jlangr
Hi Francis-- We got this working to wrap up the day. My ignorance of nginx meant that I was interpreting the example literally--I viewed the "/mirror" as the name for the internal route, but that actually becomes part of the URL the mirror location proxy forwards to. http { server { l

Re: Using the mirror module

2018-08-09 Thread jlangr
ps how do you format code in these posts? (It's not markdown) Posted at Nginx Forum: https://forum.nginx.org/read.php?2,279036,280833#msg-280833 ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx

Re: Using the mirror module

2018-08-09 Thread Francis Daly
On Thu, Aug 09, 2018 at 05:08:25PM -0400, jlangr wrote: Hi there, > hmm looks like the mirror kills the url. I need to understand how to do URL > rewrites, probably, but the original request's path isn't coming across to > the mirror location. Does it work for you if you use the Example Configur

Re: Using the mirror module

2018-08-09 Thread jlangr
hmm looks like the mirror kills the url. I need to understand how to do URL rewrites, probably, but the original request's path isn't coming across to the mirror location. Posted at Nginx Forum: https://forum.nginx.org/read.php?2,279036,280829#msg-280829 _

Re: Using the mirror module

2018-08-09 Thread jlangr
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. Swi

Re: Using the mirror module

2018-03-14 Thread Roman Arutyunyan
On Wed, Mar 14, 2018 at 08:55:39AM -0300, Kenny Meyer wrote: > How do you define a resolver? Use the "resolver" directive: http://nginx.org/en/docs/http/ngx_http_core_module.html#resolver This only makes sense if your nginx resolves domain names in runtime. In your configuration "staging.example

Re: Using the mirror module

2018-03-14 Thread Peter Booth
Suggestion: Define two more locations - one that proxies www.example.com and another that proxies staging.example.com. If both locations work then your problem is probably mirroring. If one doesn’t work then the issue is your configuration and not mirroring. Either way you have reduced the size

Re: Using the mirror module

2018-03-14 Thread Kenny Meyer
How do you define a resolver? > On 13 Mar, 2018, at 19:36, Roman Arutyunyan wrote: > > On Tue, Mar 13, 2018 at 06:58:25PM -0300, Kenny Meyer wrote: >> Hi Roman, >> >>> Are there any errors in error.log? >> No errors… >> >>> And what happens if you switch www.example.com and staging.example.com

Re: Using the mirror module

2018-03-13 Thread Roman Arutyunyan
On Tue, Mar 13, 2018 at 06:58:25PM -0300, Kenny Meyer wrote: > Hi Roman, > > > Are there any errors in error.log? > No errors… > > > And what happens if you switch www.example.com and staging.example.com? > Then I get redirected to staging.example.com and I don’t see any requests > being logged

Re: Using the mirror module

2018-03-13 Thread Peter Booth
This is the point where I would jump to using the debug log. You need to build you nginx binary with —with-debug switch and change the log level to debug innginx.conf. Debug generates a *huge* amount of logs but it really is invaluable. I would also want to double check what is actually happen

Re: Using the mirror module

2018-03-13 Thread Kenny Meyer
Hi Roman, > Are there any errors in error.log? No errors… > And what happens if you switch www.example.com and staging.example.com? Then I get redirected to staging.example.com and I don’t see any requests being logged on example.com > On 13 Mar, 2018, at 18:34, Roman Arutyunyan wrote: > >

Re: Using the mirror module

2018-03-13 Thread Roman Arutyunyan
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 { >

Using the mirror module

2018-03-13 Thread Kenny Meyer
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 / {