-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unknown directive "modsecurity_rules" in /tmp/nginx-cfg128224059:398 #3329
Comments
@LAITRUNGMINHDUC please check the configmap you are creating is being used in the ingress controller flags (from your report is not). |
@LAITRUNGMINHDUC Yeah it looks like the module is not being set. Can you post a copy of your deployment, as well as the nginx.conf( |
https://github.com/kubernetes/ingress-nginx/blob/master/deploy/mandatory.yaml Please make sure the name of the configmap match |
@aledbf Confirmed that there is an issue when enabling modsecurity via the configmap. I'll look into it later today.
|
Please use |
Closing. Fixed in #3357 |
@LAITRUNGMINHDUC I will post the link of a temporal image after #3309 is merged |
@aledbf Hello guys, thanks for your support. Sorry for this late reply and not keeping in touch. My Azure account was out of credit, and I was busy last week (I got much homework and reports). I will try the solution after my account is renew. Thanks again. Besides that, because I am new to Kubernetes, I want to ask: Thank you |
Is this a request for help? (If yes, you should use our troubleshooting guide and community support channels, see https://kubernetes.io/docs/tasks/debug-application-cluster/troubleshooting/.): YES
What keywords did you search in NGINX Ingress controller issues before filing this one? (If you have found any duplicates, you should instead reply there.): modsecurity, modsecurity_rules
Is this a BUG REPORT or FEATURE REQUEST? (choose one): BUG REPORT
NGINX Ingress controller version: 0.20.0
Kubernetes version (use
kubectl version
): v1.11.3 (Server)Environment:
uname -a
): N/AWhat happened:
The ModSecurity feature doesn't work. In the log file, I saw these lines, and it keeps generating:
Error: exit status 1 2018/10/31 01:45:51 [emerg] 24881#24881: unknown directive "modsecurity_rules" in /tmp/nginx-cfg128224059:398 nginx: [emerg] unknown directive "modsecurity_rules" in /tmp/nginx-cfg128224059:398 nginx: configuration file /tmp/nginx-cfg128224059 test failed
What you expected to happen:
The ModSecurity feature work: Detect and block malicious requests and don't generate those lines of log.
How to reproduce it (as minimally and precisely as possible):
After create AKS on Azure and install NginX Ingress with HELM (namespace: ingress-nginx), here are 2 files (run it in order) to reproduce the error:
1/ MyConfigMap.yaml
2/ MyIngress.yaml
Anything else we need to know:
kubectl logs -n ingress-nginx <pod-name>
.The text was updated successfully, but these errors were encountered: