Welcome! Log In Create A New Profile

Advanced

Nginx behavior still working as is today ?

Mik J via nginx
September 28, 2024 02:36PM
Hello,

Someone pointed this out to me

Maxim D.: The ​try_files directive changes URI of a request to the one matched on the file system, and subsequent attempt to split the URI into $fastcgi_script_name and $fastcgi_path_info results in empty path info - as there is no path info in the URI after try_files.

That was 11 years ago, is it still true ?
I use Nginx 1.24

Also, I have something like this

server {
        listen 80;

...
        location / {
          try_files $uri $uri/ /index.php$is_args$args;

...
In that location bloc I have
          location ~ ^(.+\.php)(.*)$ {
...
              fastcgi_split_path_info ^(.+\.php)(/.*)$;


I don't have any try_files in my location ~ ^(.+\.php)(.*)$ { but this bloc exist within location / {

What rule applies ?
- There shouldn't be any try_files in the same bloc ( location ~ ^(.+\.php)(.*)$ { ) for me ?
- Or even no try_files in the parent bloc
- Or even no try_files at all in the server bloc

Thank you
_______________________________________________
nginx mailing list
nginx@nginx.org
https://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Nginx behavior still working as is today ?

Mik J via nginx September 28, 2024 02:36PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 264
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready