Welcome! Log In Create A New Profile

Advanced

Re: Nginx Location Block

Julian De Marchi
May 26, 2015 08:00PM
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,
>
>> 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{}?

For this virtual host, yes it is. My rewriting logic is performed in the
backend. There are no include directives.

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

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.

--julian

_______________________________________________
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: 179
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