not proxy php requests

Yaşar Arabacı yasar11732 at
Sat Jul 23 04:59:10 UTC 2011

What do you mean by getting php request by hackers? Do you get requests for
files with php extension. If so, a simple location directive should have
solve this.

location ~ \.php {
return 404;

2011/7/23 mike chen <lists at>

> Hi,
> I have been searching for a solution for below problem but no luck,
> would greatly appreciate if someone shed some lights on it.
> Basically I run a tomcat java app behind the nginx but keep getting php
> requests from hackers, my log is flooded with php requets.  Right now,
> the php request would also get proxied to the tomcat, my question is if
> there is any ways to stop that? just having nginx return 444 or
> something.  How does everyone handles it?
> Thanks
> Mike Chen
> --
> Posted via
> _______________________________________________
> nginx mailing list
> nginx at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list