# Not proxy php requests

**URL:** <https://www.ruby-forum.com/t/not-proxy-php-requests/209809>\
**Category:** NGINX\
**Created:** [July 23, 2011, 6:49am UTC](https://www.ruby-forum.com/t/not-proxy-php-requests/209809 "2011-07-23T06:49:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [July 23, 2011, 6:49am UTC](https://www.ruby-forum.com/t/not-proxy-php-requests/209809/1 "2011-07-23T06:49:18Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![mikec](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/977dab/32.png) [@mikec](https://www.ruby-forum.com/u/mikec)\
**Post date:** [July 23, 2011, 7:00am UTC](https://www.ruby-forum.com/t/not-proxy-php-requests/209809/2 "2011-07-23T07:00:02Z")

</div>

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 [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
