Nginx Location Block

Francis Daly francis at daoine.org
Tue May 26 23:45:58 UTC 2015


On Mon, May 25, 2015 at 03:44:26PM +1000, Julian De Marchi wrote:

Hi there,

> Briefly, my setup is using an Nginx frontend server to do SSL offloading
> then pass requests to my backend Nginx servers which then process the
> request via fastCGI.
> 
> 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.
> 
> Here is my frontend location block:

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{}?

> What I don't understand is this, why does Ngnix pass the URI /cms/ to my
> backend fine, but add /cms/index.php to the end and it does not pass to
> the backend?

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

Do you watch a tcpdump trace, or do you watch the backend access log,
or something like that?

	f
-- 
Francis Daly        francis at daoine.org



More information about the nginx mailing list