Block bad requests to file extensions not supported on the server. For example, requests to .asp or .jsp on server which supports PHP only. Can help prevent overloading of the website/application with invalid requests.

To prevent processing requests based on file extension, use the following location directive:

server {

	# ...

	location ~ \.(aspx|cfm|jsp|cgi)$ {
		return 410;
	}

	# ...

}

This would cause all requests files whose extension is in the pipe-delimited list above to return a 410 Gone response.