Join the community today
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:
    5:28 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

    36,915
    8,074
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,438
    Local Time:
    9:58 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    • Like Like x 1
  3. eva2000

    eva2000 Administrator Staff Member

    36,915
    8,074
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,438
    Local Time:
    9:58 PM
    Nginx 1.15.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:
    5:28 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

    36,915
    8,074
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,438
    Local Time:
    9:58 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    thanks for the confirmation :)
     
..