Welcome! Log In Create A New Profile

Advanced

Re: Nginx Location Block

Francis Daly
May 26, 2015 08:16PM
On Wed, May 27, 2015 at 09:58:42AM +1000, Julian De Marchi wrote:
> On 27/05/15 09:45, Francis Daly wrote:
> > On Mon, May 25, 2015 at 03:44:26PM +1000, Julian De Marchi wrote:

Hi there,

> >> My issue is when I try to access URIs like /cms/index.php?blah, the
> >> frontend Nginx gives 404. Access with /cms/ and Nginx passes the request
> >> to the backend.

> > Is this the only location{} block in the only server{} block in your
> > frontend nginx.conf file? Are there any "include" directives that
> > might add others? Are there any rewrite-module directives outside this
> > location{}?
>
> For this virtual host, yes it is. My rewriting logic is performed in the
> backend. There are no include directives.

I am unable to reproduce what you report.

The configuration you have shown, plus some assumed configuration that
you have not shown, should not do what you report it does do.

Can you try using a separate access_log in this frontend server{} block,
and confirming that the request is handled by this server{} and not by
any other one?

> > How do you know that it does not pass it to the backend?

> I'm watching the backend access log for the virtual host and never see
> it come in. When a requests reaches the backend I also insert headers so
> I can tell which backend server handled the request.

Does the backend configuration include anything that would log to a
different access log, or not log at all?

Or can you (temporarily, or on a test system) replace the backend with
one that just does "return 200 here", and confirm that you do not get
that response when you make the second request?

Is there any form of caching going on? Are you testing using "curl"
or a bigger browser?

f
--
Francis Daly francis@daoine.org

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

Nginx Location Block

Julian De Marchi May 25, 2015 01:46AM

Re: Nginx Location Block

Aleksandar Lazic May 25, 2015 03:06AM

Re: Nginx Location Block

Julian De Marchi May 25, 2015 04:12AM

Re: Nginx Location Block

Francis Daly May 26, 2015 07:48PM

Re: Nginx Location Block

Julian De Marchi May 26, 2015 08:00PM

Re: Nginx Location Block

Francis Daly May 26, 2015 08:16PM

Re: Nginx Location Block

Julian De Marchi May 26, 2015 08:44PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 171
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready