Learn about Centmin Mod LEMP Stack today
Become a Member

Nginx bug on latest .08 Beta branch?

Discussion in 'Bug Reports' started by RoldanLT, Mar 31, 2015.

Tags:
  1. RoldanLT

    RoldanLT Well-Known Member

    3,822
    928
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,256
    Local Time:
    5:59 PM
    1.11
    10.2
    Installed a fresh centminmod based vps on DO.
    And I got this:
    Code:
    **********************************************************************
    * Starting Services...
    **********************************************************************
    Starting ntpd:                                             [  OK  ]
    Starting nginx: nginx: [emerg] unknown directive "geoip_country" in /usr/local/nginx/conf/geoip.conf:2
                                                               [FAILED]
    
    on centmin.sh
    Code:
    NGINX_GEOIP=n             # Nginx GEOIP module install

     
    • Like Like x 1
  2. eva2000

    eva2000 Administrator Staff Member

    28,935
    6,567
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,747
    Local Time:
    7:59 PM
    Nginx 1.13.x
    MariaDB 5.5
    what does nginx -V output show (wrap in QUOTE tags)

    .08 beta 02 ?
     
  3. RoldanLT

    RoldanLT Well-Known Member

    3,822
    928
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,256
    Local Time:
    5:59 PM
    1.11
    10.2
    yes .08 beta 2
     
    • Like Like x 1
  4. eva2000

    eva2000 Administrator Staff Member

    28,935
    6,567
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,747
    Local Time:
    7:59 PM
    Nginx 1.13.x
    MariaDB 5.5
    I see inc/geoip.inc was missing some additional logic for evaluating NGINX_GEOIP=y|n as to how to handle the geoip.conf include file (whether it's commented out or uncommented). Basically with NGINX_GEOIP=n, inc/geoip.inc the geoinccheck function enabled geoip.conf include regardless of NGINX_GEOIP=n.

    commited fix to inc/geoip.inc's geoincheck function at (lines 86 to 108) fix NGINX_GEOIP variable control in inc/geoip.inc · centminmod/centminmod@5d6e3d2 · GitHub

    You could just replace you're existing inc/geoip.inc with updated version too instead of full re-install + recompile Nginx via centmin.sh menu option 4 to test the fix :) Or just comment out the geoip.conf in nginx.conf for existing install
     
    Last edited: Mar 31, 2015
    • Like Like x 1
  5. RoldanLT

    RoldanLT Well-Known Member

    3,822
    928
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,256
    Local Time:
    5:59 PM
    1.11
    10.2
    Still happening on latest install.
    Because this code is present on php.conf
     
    • Like Like x 1
  6. eva2000

    eva2000 Administrator Staff Member

    28,935
    6,567
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,747
    Local Time:
    7:59 PM
    Nginx 1.13.x
    MariaDB 5.5
    do these commands fix it ?

    Code:
    sed -i 's/fastcgi_param GEOIP_/#fastcgi_param GEOIP_/' /usr/local/nginx/conf/php.conf
    fpmrestart
     
  7. RoldanLT

    RoldanLT Well-Known Member

    3,822
    928
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,256
    Local Time:
    5:59 PM
    1.11
    10.2
    I already fixed it, by editing manually :(
     
  8. eva2000

    eva2000 Administrator Staff Member

    28,935
    6,567
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,747
    Local Time:
    7:59 PM
    Nginx 1.13.x
    MariaDB 5.5
    • Like Like x 1
  9. RoldanLT

    RoldanLT Well-Known Member

    3,822
    928
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,256
    Local Time:
    5:59 PM
    1.11
    10.2
    Still this is a bug.
    If you upgrade PHP then choose to replace php-fpm.conf, goeip codes still added :)
     
  10. eva2000

    eva2000 Administrator Staff Member

    28,935
    6,567
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,747
    Local Time:
    7:59 PM
    Nginx 1.13.x
    MariaDB 5.5
    doh guess I missed that - will look into it :)
     
    • Like Like x 1
  11. eva2000

    eva2000 Administrator Staff Member

    28,935
    6,567
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,747
    Local Time:
    7:59 PM
    Nginx 1.13.x
    MariaDB 5.5