Want to subscribe to topics you're interested in?
Become a Member

Upgrade NGINX failes to start with Mod Security

Discussion in 'Add Ons' started by Mridul, Nov 2, 2018.

  1. Mridul

    Mridul New Member

    3
    1
    3
    Nov 2, 2018
    Ratings:
    +1
    Local Time:
    7:58 PM
    1.5.15
    Hii, I just updated my New Server .

    First I added :

    Code:
    NGINX_MODSECURITY='y'
    Then I Upgraded NGINX using Option No 4.

    But then none of the domains are loading and NGINX is failing to start.
    Output :
    Code:
    # nginx -t
    nginx: [emerg] "modsecurity_rules_file" directive Rules error. File: /usr/local/nginx/modsec/modsecurity.conf. Line: 236. Column: 17. Failed to locate the unicode map file from: unicode.mapping Looking at: 'unicode.mapping', 'unicode.mapping', '/usr/local/nginx/modsec/unicode.mapping', '/usr/local/nginx/modsec/unicode.mapping'.  in /usr/local/nginx/conf/conf.d/virtual.conf:18
    nginx: configuration file /usr/local/nginx/conf/nginx.conf test failed
    System :
    • CentOS Version: CentOS 7 64bit
    • Centmin Mod Version Installed: 123.09beta01
    • Nginx Version Installed: 1.15.5
    • PHP Version Installed: 5.6.37
    • MariaDB MySQL Version Installed: i.e. 10.0.x
     
  2. eva2000

    eva2000 Administrator Staff Member

    41,367
    9,285
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,243
    Local Time:
    12:28 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    • Like Like x 1
  3. eva2000

    eva2000 Administrator Staff Member

    41,367
    9,285
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,243
    Local Time:
    12:28 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    what happens if you manually download the missing unicode.mapping file via command and restart nginx
    Code (Text):
    wget -P /usr/local/nginx/modsec/ https://github.com/SpiderLabs/ModSecurity/raw/v3/master/unicode.mapping
    ngxrestart
    
     
    • Agree Agree x 1
  4. Mridul

    Mridul New Member

    3
    1
    3
    Nov 2, 2018
    Ratings:
    +1
    Local Time:
    7:58 PM
    1.5.15
    It worked !! Thank you so much.

    Code:
    # ngxrestart
    Restarting nginx (via systemctl):                          [  OK  ]
    
     
    • Like Like x 1
  5. eva2000

    eva2000 Administrator Staff Member

    41,367
    9,285
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,243
    Local Time:
    12:28 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    thanks for the confirmation :)
     
  6. enderst

    enderst New Member

    25
    5
    3
    Dec 12, 2017
    Ratings:
    +8
    Local Time:
    8:28 AM
    Somehow how I missed this thread when I ran into this issue. The file is included, just doesn't get copied into place.
    Upgrade and modsecurity
     
  7. eva2000

    eva2000 Administrator Staff Member

    41,367
    9,285
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,243
    Local Time:
    12:28 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    Yeah I updated 123.09beta01 so it can copy the file correctly :)
     
    • Like Like x 1