Denying certain file types within a location

Dear all,
I would like to deny all php|cgi|pl files in a certain location.
Whats the best way to do that.

I have something like this

location /some/path {
root /fs/path;
}

Shall I do a check with script_filename?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs