Nginx Location Block
Aleksandar Lazic
al-nginx at none.at
Mon May 25 07:04:48 UTC 2015
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 at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
More information about the nginx
mailing list