<html><head><style>body{font-family:Iosevka Term,Arial;font-size:16px}</style></head><body><div style="font-family:Iosevka Term,Arial;font-size:16px"><div style="margin:0px">Hi guys</div><div style="margin:0px"><br></div><div style="margin:0px">Seems server config analysis engine in Nginx Amplify fails to recognize common regex pattern</div><div style="margin:0px"><br></div><div style="margin:0px">Server config analysis reports</div><div style="margin:0px"><br></div><div style="margin:0px">——————</div><div style="margin:0px">Regex location has no regex pattern</div><div style="margin:0px"><br></div><div style="margin:0px">Regex location has a valid modifier, but does not have a regex pattern.</div><div style="margin:0px">Performance-wise it is more efficient to configure exact or prefix matching for locations that do not require regex matching. It is also less prone to errors. Please refer to the documentation describing location directive to learn more.</div><div style="margin:0px"><br></div><div style="margin:0px">Check the following files:</div><div style="margin:0px">/etc/nginx/conf.d/location.common.conf, line 11</div><div style="margin:0px">-------------</div><div style="margin:0px"><br></div><div style="margin:0px">While line 11 of that file indeed does contain regex pattern: location ~ "/\." {</div><div style="margin:0px"><br></div><div style="margin:0px">I.e. any file or folder which name starts with dot. The goal is to protect dot files like .env from public access. The complete rule follows</div><div style="margin:0px"><br></div><div style="margin:0px">location ~ "/\." {</div><div style="margin:0px"> return 444;</div><div style="margin:0px">}</div></div><div class="bloop_container"><div class="bloop_frame"> </div></div><br><div class="gmail_signature"><div><div><div><font face="Iosevka-Term" size="3"><span style="font-style:normal">--</span></font></div><div><font face="Iosevka-Term" size="3"><span style="font-style:normal">Juliy V. Chirkov</span></font></div><div><font face="Iosevka-Term" size="3"><span style="font-style:normal"><a href="https://juliyvchirkov.github.io">https://juliyvchirkov.github.io</a></span></font></div></div></div></div></body></html>