Madhumitha,You are correct – that rules file uses Apache-specific <LocationMatch> directives. The idea is that you don't want to inject anti-CSRF tokens into all responses. This allows the user to defined directories, etc.. Where they want to use it.
If you are running on Nginx – you should be able to use the Location directive syntax here - http://wiki.nginx.org/HttpCoreModule#location
Lead Security Researcher, SpiderLabs
Trustwave | SMART SECURITY ON DEMAND
I am using nginx 1.4 and modsecurity 2.7.7
Apart from the base rules I am trying to use the "optional_rules/modsecurity_crs_43_csrf_protection.conf" in nginx.
But when i start the nginx with the above said rules i get the following error "Unknown command in config: <LocationMatch " and the nginx refuses to start
When i did searched for the info, one of the sites says the LocationMatch(Apache directive) support is not there for IIS and it will be provided shortly
Does this hold true for nginx as well ?
And if i comment out LocationMatch, nginx starts properly and if i do so then i fear i may not be able to add the CSRF support with nginx+modsecurity
Or is it any particular segment that i can comment out in the file "optional_rules/modsecurity_crs_43_csrf_protection.conf" and add CSRF support
This transmission may contain information that is privileged, confidential, and/or exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is strictly prohibited. If you received this transmission in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format.
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
mod-security-users mailing list
Commercial ModSecurity Rules and Support from Trustwave's SpiderLabs: