GZip doesn't work with Nginx_Apache + mod_security

mean

Verified User
Joined
Feb 14, 2007
Messages
103
Hello

I have a installation nginx reverse proxy
server=nginx_apache by custombuild

When i enabled mod_security on nginx
gzip is not compression for static file css , js , html

When i disabled mod_security on nginx
gzip is compressed

=============================================
Request Header
HTML:
Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding:gzip, deflate
Accept-Language:en-US,en;q=0.8
Cache-Control:no-cache
Connection:keep-alive
Cookie:_ga=GA1.2.1462238671.1497365382; _gid=GA1.2.849636490.1507565583
Host: domain.com
Pragma:no-cache
Upgrade-Insecure-Requests:1
User-Agent:Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36
=============================================

Gzip doesn't work with enable Mod_security on Nginx
Response Header
HTML:
HTTP/1.1 200 OK
Server: nginx
Date: Tue, 10 Oct 2017 04:35:55 GMT
Content-Length: 10606
Last-Modified: Fri, 09 Jun 2017 09:54:17 GMT
Connection: close
ETag: "593a7049-296e"
Content-Type: text/css
Content-Length: 10606
Last-Modified: Fri, 09 Jun 2017 09:54:17 GMT
Connection: close
Accept-Ranges: bytes

Gzip is work with disabled Mod_security on Nginx
HTML:
HTTP/1.1 200 OK
Server: nginx
Date: Tue, 10 Oct 2017 04:40:19 GMT
Content-Type: text/css
Last-Modified: Fri, 09 Jun 2017 09:54:17 GMT
Transfer-Encoding: chunked
Connection: close
Vary: Accept-Encoding
ETag: W/"593a7049-296e"
Expires: Tue, 24 Oct 2017 04:40:19 GMT
Cache-Control: max-age=1209600
Content-Encoding: gzip


How to solve this problem.

Thanks
Best Regards
CJ
 
Hello,

I personally don't use Mod_security with Nginx, I use Nginx without mod_security and don't have any server with Mod_security and Nginx. Probably somebody else could try and check it.

I guess you will have more luck if you report your specific issue here: https://trac.nginx.org/nginx/
 
other nginx + mod_security i found httpd header is duplicate.
now i disabled mod_security with nginx

zEitEr , thank you.
 
Back
Top