Results 1 to 3 of 3

Thread: GZip doesn't work with Nginx_Apache + mod_security

  1. #1
    Join Date
    Feb 2007
    Posts
    33

    GZip doesn't work with Nginx_Apache + mod_security

    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 Code:
    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 Code:
    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 Code:
    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
    Thailand Linux Web hosting and Domain name registration.
    IREALLYHOST.com

  2. #2
    Join Date
    Apr 2005
    Location
    GMT +7.00
    Posts
    11,386
    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/
    With regards, Alex.

    Professional Server Management for web hosting companies and individuals
    Hourly Support, Disaster Recovery, Server Hardening, Monthly Subscription
    Directadmin installation and optimization

    Click here if you need a Linux Admin

  3. #3
    Join Date
    Feb 2007
    Posts
    33
    other nginx + mod_security i found httpd header is duplicate.
    now i disabled mod_security with nginx

    zEitEr , thank you.
    Thailand Linux Web hosting and Domain name registration.
    IREALLYHOST.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •