Welcome! Log In Create A New Profile

Advanced

Re: nginx + php-fpm: REQUEST_URI disappears for files that end with .php

Francis Daly
March 08, 2018 07:02PM
On Thu, Mar 08, 2018 at 01:48:41PM +0200, ST wrote:

Hi there,

* What request do you make? (e.g. /rus_example.php)
* Does the matching file exist on the filesystem
(e.g. /usr/local/nginx/html/rus_example.php)?
* If yes - what response do you want, and what response do you get?
* If no - what response do you want, and what response do you get?

> error_page 404 = /netcat/require/e404.php;
>
> location ~ \.php$ {
> if ($args ~ "netcat_files/") {
> expires 7d;
> add_header Cache-Control "public";
> }
>
> fastcgi_split_path_info ^(.+\.php)(/.+)$;
> try_files $uri =404;

If /usr/local/nginx/html/rus_example.php does not exist, that line
says "return 404", which the error_page line turns into a request for
/netcat/require/e404.php

f
--
Francis Daly francis@daoine.org
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

nginx + php-fpm: REQUEST_URI disappears for files that end with .php

ST March 08, 2018 06:50AM

Re: nginx + php-fpm: REQUEST_URI disappears for files that end with .php

Francis Daly March 08, 2018 07:02PM

Re: nginx + php-fpm: REQUEST_URI disappears for files that end with .php

ST March 09, 2018 04:42AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 273
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