<html><head>

<style id="css_styles" type="text/css"><!--blockquote.cite { margin-left: 5px; margin-right: 0px; padding-left: 10px; padding-right:0px; border-left: 1px solid #cccccc }
blockquote.cite2 {margin-left: 5px; margin-right: 0px; padding-left: 10px; padding-right:0px; border-left: 1px solid #cccccc; margin-top: 3px; padding-top: 0px; }
a img { border: 0px; }
li[style='text-align: center;'], li[style='text-align: center; '], li[style='text-align: right;'], li[style='text-align: right; '] {  list-style-position: inside;}
body { font-family: 'Segoe UI'; font-size: 12pt; }
.quote { margin-left: 1em; margin-right: 1em; border-left: 5px #ebebeb solid; padding-left: 0.3em; }
a.em-mention[href] { text-decoration: none; color: inherit; border-radius: 3px; padding-left: 2px; padding-right: 2px; background-color: #e2e2e2; }
._em_placeholder {color: gray; border-bottom: 1px dotted lightblue;} ._em_placeholder:before{color:gray; content: '{{ ';} ._em_placeholder:after{color:gray; content: ' }}';}
--></style></head>
<body style="background-color: white; color: black;"><div style="">Hi Paul,</div><div style=""><br style="" /></div><div style="">If that server block is only serving Perl and nothing else at all, you should be fine to just strip out anything PHP-extension request-like without using the if statement. Judging with what you've stated, and without having seen access/error logs, it might be best to simply use the following for the Perl server configuration block:</div><div style=""><br style="" /></div><div style="">location ~ \.php$ {
 return 444; <span>}</span></div><div style=""><br style="" /></div><div style="">It may also be pertinent to utilize `access_log off;
` and `log_not_found off;` within that location clause if you are also having resource/log-storage issues. </div><div style=""><br style="" /></div><div style="">Additionally, if the bogus PHP requests are coming from clients not sending a user agent (which from my POV, has been a common theme with probing bots lately), you could also configure this within the overall server {} block:</div><div style=""><br style="" /></div><div style="">if ($http_user_agent = "") {
 <span>return 444; }</span></div><div style=""><br style="" /></div><div id="signature_old" style="clear: both;">Regards,<br style="" />Brett</div><div style=""><br style="" /></div>
<div x-em-replyforwardheader="" style=""><br style="" /></div>
<div style="">
<div style="">------ Original Message ------</div>
<div style="">From "Paul" <<a href="mailto:paul@stormy.ca" style="">paul@stormy.ca</a>></div>
<div style="">To <a href="mailto:nginx@freenginx.org" style="">nginx@freenginx.org</a></div>
<div style="">Date 08/28/2025 07:13:26 P</div>
<div style="">Subject Using 444</div></div><div x-em-quote="" style=""><br style="" /></div>
<div id="x84180f4729e5425" class="plain" style=""><blockquote cite="d2901134-cb9c-4263-be6e-2f4475049fe6@stormy.ca" type="cite" class="cite2" style="">

<div class="plain_line" style="">I'm looking for advice, please. Using Nginx v1.18.0 (Ubuntu) which is "old" but security updated by Canonical, rock solid and very fast, for several static html sites and as proxy to a couple of other sites using python or perl. Total ~250k requests/day</div>
<div class="plain_line" style=""> </div>
<div class="plain_line" style="">Recently logs have started showing ~10k php requests in rapid bursts. On a proxy to a perl box, this is a serious slow down</div>
<div class="plain_line" style=""> </div>
<div class="plain_line" style="">I've added the following, appears to work well</div>
<div class="plain_line" style=""> </div>
<div class="plain_line" style="">location ~ \.php$ {</div>
<div class="plain_line" style="">     if ($request_method = GET) {</div>
<div class="plain_line" style="">             return 444; # Drop</div>
<div class="plain_line" style="">     }</div>
<div class="plain_line" style="">}</div>
<div class="plain_line" style=""> </div>
<div class="plain_line" style="">I'm considering editing to  ^(GET|HEAD|POST)$) {</div>
<div class="plain_line" style=""> </div>
<div class="plain_line" style="">Any thoughts, downsides, recommendations?</div>
<div class="plain_line" style=""> </div>
<div class="plain_line" style="">Tnx and warmest regards to all,</div>
<div class="plain_line" style="">Paul</div>
</blockquote></div>


</body></html>