-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Nginx: Added SecDisableBackendCompression support #44
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
Nginx: Added SecDisableBackendCompression support #44
Conversation
Something is still wrong: I think i can try to merge it manually. I will try tomorrow. Thanks Breno |
shall we add to pool context as a separate module(source code tree) or merge it and modsecurity into one module? |
I would suggest you add it as apr_bucket_nginx.[ch], then call the API into ngx_http_modsecurity.c. Should be a clean way to make it, what do you think ? Thanks Breno |
I mean add ngx-pool-context.[ch] not as module, but call the API inside ngx_http_modsecurity.c Thanks Breno |
ngx-pool-context not only has APIs, but also has a configure command which set the hash table size. so if not as module, we should rewrite this part. can we move ngx-pool-context.[ch] to modsecurity folder and combine ngx-pool-context and modsecurity config file like this?(https://github.com/chaizhenhua/ModSecurity/blob/60423e0004b903f94ec51fd25edf28cb054827eb/nginx/modsecurity/config). I have added this patch here. |
Nginx: Added internel redirected request processing
hi, Breno I have fixed the merge. now you can merge. |
Nginx: Added SecDisableBackendCompression support
Applied. Thanks |
Hello chaizhenhua After this patch i'm getting: root@ubuntu:/home/vmplanet/nginx-1.2.7# /usr/local/nginx/sbin/nginx This my config file: Can you take a look please ? |
what's in your nginx.conf file? the directive has never been changed. |
nginx.conf
Shouldn't been related to the new ngx_pool_context_module ? |
hi, brenosilva
|
I changed : from to And it loads the directive. But i think it is wrong. Because for each request nginx process is exiting and doesn't serving anything: error.log: |
Yes. I already asked Greg to fix it. However to test the nginx module now. Just comment it:
|
my env has changed .I cant build nginx, i will check it tomorrow. this is the error message.
|
Ok. I updated the standalone/Makefile.am. so Just don't forget to execute "make install: when compiling mod_security. It will auto-create the right config file Thanks |
I added this config manually: ngx_addon_name=ngx_pool_context_module And looks like it fixed the issue. However i noticed unwanted data in audit.log like: --5c5c930e-B-- --5c5c930e-B-- Looks like a memory leak. Let me know if this config file is OK. Thanks |
hummm doing this change in the config file sometimes it works sometimes doesn't.... i'm seeing signal 11 in the error.log. I think there is something related to new arch with ngx_pool_context |
Also...i saw you are using ngx_pstrdup to copy data. I think at least the data that is going to apr need to be null-terminated. Maybe we can use a new version like: u_char *ngx_pstrdup0(ngx_pool_t *pool, ngx_str_t *src) { |
chaizhenhua, I can confirm the issue with ngx_pool_context. If i comment the ngx_pool_context code inside ngx_http_modsecurity.c and add the ngx_pstrdup0 everything works fine No more memory leaks and Nginx serves the requests. Also need to set back the config file to: ngx_addon_name=ngx_http_modsecurity HTTP_MODULES="$HTTP_MODULES ngx_http_modsecurity"HTTP_HEADERS_FILTER_MODULE="ngx_http_modsecurity $HTTP_HEADERS_FILTER_MODULE" Thanks Breno |
hello,Breno #49 will fix this. it's typeset error. |
Nginx: Added SecDisableBackendCompression support
Nginx: Added internel redirected request processing