-
Notifications
You must be signed in to change notification settings - Fork 291
Error 500 but mod_sec 403 expected nginx 1.16 #193
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
Comments
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days |
@cello86 I have exactly the same issue. Modsec correctly catches and logs the 403, but a 500 "header already sent" is thrown just after, and so the client doesn't get a 403, but a "closed connection" error... |
@mtx-z which version of connector are you using? |
@mtx-z In your configuration you have: nginx : 1.20.1 In my scenario I had the nginx-modsecurity-connector 1.0.0 and this created the problem. We update to 1.0.1 and we added a configuration to solve the issue but the latest nginx-modsecurity-connector 1.0.2 can help you to solve the problem. could you check your nginx-connector version? |
Well, I'm not sure how to check the connector version. As from my test using Ty again |
I used this config to solve the issue
|
@cello86 thanks a lot, I'll give it a try. Is the location-specific to your error? Meaning you only had the issue on your /error location? Thanks again, I'll report back. |
@mtx-z this config disables the mod_security to provide the error page bypassing the check of mod_sec. |
Hi All,
we are facing and issue on a nginx 1.16.1 with mod_sec v3 and nginx-connecto v1.0. In same case with some reactjs contents we noticed a 500 response, but the mod sec engine gets a 403 response on these contents and we didn't identify the issue. After some other checks we noticed also the error "109093 header already sent while sending response to client" into the logs and we discover the pull request #84 related to this issue.
Could it be that the gzip enabled on nginx side can create this issue?
Thanks,
Marcello
The text was updated successfully, but these errors were encountered: