Welcome! Log In Create A New Profile

Advanced

Php page returns 450

Mik J via nginx
July 23, 2022 06:04AM
Hello,
I use an application named Cacti and everything works well except the logout.php page
So when I try to accesshttps://example.org/index.phphttps://example.org/graph_view.phpIt works, code http is 200
But when I access the logout.php page a page 404 is returnedGET /logout.php HTTP/2.0
For php pages I use this   location ~ \.php$ {
            try_files           $uri =450;
            fastcgi_pass        unix:/run/php-fpm.cacti.sock;
            fastcgi_split_path_info ^(.+\.php)(/.+)$;
            fastcgi_index       index.php;
            fastcgi_param       SCRIPT_FILENAME $document_root$fastcgi_script_name;
            include             fastcgi_params;
            limit_except        GET HEAD POST { deny all; }
   }
So I would expect a 450 code
If I add this line location = /logout.php { return 405; } before that stanza, a 405 code is returned   location = /logout.php { return 405; }
   location ~ \.php$ {
            try_files           $uri =450;
            fastcgi_pass        unix:/run/php-fpm.cacti.sock;
            fastcgi_split_path_info ^(.+\.php)(/.+)$;
            fastcgi_index       index.php;
            fastcgi_param       SCRIPT_FILENAME $document_root$fastcgi_script_name;
            include             fastcgi_params;
            limit_except        GET HEAD POST { deny all; }
   }
So it matches my location
My location ~ \.php$ { doesn't seem to mach when the logout.php page is accessed and I don't understand why
Do you have any advice ?

Thank you

_______________________________________________
nginx mailing list -- nginx@nginx.org
To unsubscribe send an email to nginx-leave@nginx.org
Subject Author Posted

Php page returns 450

Mik J via nginx July 23, 2022 06:04AM

Re: Php page returns 450

Mik J via nginx July 23, 2022 04:20PM

Error log question

Jay Haines July 23, 2022 05:02PM

Re: Error log question

Maxim Dounin July 23, 2022 06:18PM

Re: Error log question

Jay Haines July 24, 2022 09:52AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 59
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready