Welcome! Log In Create A New Profile

Advanced

Re: Nginx Location Block

Aleksandar Lazic
May 25, 2015 03:06AM
Hi Julian.

Am 25-05-2015 07:44, schrieb Julian De Marchi:
> heya-
>
> I'm having some interesting dramas with Nginx location block. I put it
> down to a misconfiguration in my conf files, but I can't locate what it
> possible could be.
>
> 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.

You must tell nginx to use fcgi.

http://nginx.org/en/docs/http/ngx_http_fastcgi_module.html

but you config snippet shows.

http://nginx.org/en/docs/http/ngx_http_proxy_module.html

> 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:
>
> location / {
> limit_req zone=root burst=300;
> proxy_set_header Host $host;
> proxy_set_header X-Real-IP $remote_addr;
> proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
> proxy_set_header HTTPS on;
> proxy_set_header X-Forwarded-HTTPS on;
> proxy_set_header X-Forwarded-Protocol $scheme;
> proxy_pass http://webpool;
> }
>

[snipp]

> I've read and re-read the below and I'm drawing blanks, as my
> understanding is, it should work.
> -
> https://www.digitalocean.com/community/tutorials/understanding-nginx-server-and-location-block-selection-algorithms

maybe you could also read.

https://www.digitalocean.com/community/tutorials/understanding-and-implementing-fastcgi-proxying-in-nginx

> - http://nginx.org/en/docs/http/ngx_http_core_module.html#location

http://nginx.org/en/docs/http/ngx_http_fastcgi_module.html

and for deeper understanding try

http://lmgtfy.com/?q=how+fast+cgi+work

> Many thanks in advance for helping me understand my problem.

HTH

> --julian

Aleks
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx

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