<html><head></head><body><div class="yahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;"><div dir="ltr" data-setdir="false">Hello,</div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false">I use an application named Cacti and everything works well except the logout.php page</div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false">So when I try to access</div><div dir="ltr" data-setdir="false">https://example.org/index.php</div><div dir="ltr" data-setdir="false">https://example.org/<span>graph_view.php</span></div><div dir="ltr" data-setdir="false">It works, code http is 200</div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false">But when I access the logout.php page a page 404 is returned</div><div dir="ltr" data-setdir="false"><span>GET /logout.php HTTP/2.0</span></div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false">For php pages I use this</div><div dir="ltr" data-setdir="false"><div dir="ltr" data-setdir="false">   location ~ \.php$ {<br>            try_files           $uri =450;<br>            fastcgi_pass        unix:/run/php-fpm.cacti.sock;<br>            fastcgi_split_path_info ^(.+\.php)(/.+)$;<br>            fastcgi_index       index.php;<br>            fastcgi_param       SCRIPT_FILENAME $document_root$fastcgi_script_name;<br>            include             fastcgi_params;<br>            limit_except        GET HEAD POST { deny all; }<br>   }<br><div>So I would expect a 450 code</div><div><br></div><div dir="ltr" data-setdir="false">If I add this line <span>location = /logout.php { return 405; } </span>before that stanza, a 405 code is returned</div><div dir="ltr" data-setdir="false"><div>   location = /logout.php { return 405; }<br>   location ~ \.php$ {<br>            try_files           $uri =450;<br>            fastcgi_pass        unix:/run/php-fpm.cacti.sock;<br>            fastcgi_split_path_info ^(.+\.php)(/.+)$;<br>            fastcgi_index       index.php;<br>            fastcgi_param       SCRIPT_FILENAME $document_root$fastcgi_script_name;<br>            include             fastcgi_params;<br>            limit_except        GET HEAD POST { deny all; }<br>   }<br><div>So it matches my location</div><div><br></div><div dir="ltr" data-setdir="false">My location <span>~ \.php$ { doesn't seem to mach when the logout.php page is accessed and I don't understand why</span></div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false">Do you have any advice ?<br></div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false">Thank you</div></div></div></div><div><br></div></div><div dir="ltr" data-setdir="false"><br></div></div></body></html>