Discover Centmin Mod today
Register Now

Nginx bug on latest .08 Beta branch?

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

Tags:
  1. rdan

    rdan Well-Known Member

    5,439
    1,398
    113
    May 25, 2014
    Ratings:
    +2,187
    Local Time:
    11:14 AM
    Mainline
    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


     
  2. eva2000

    eva2000 Administrator Staff Member

    53,461
    12,128
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,668
    Local Time:
    1:14 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    what does nginx -V output show (wrap in QUOTE tags)

    .08 beta 02 ?
     
  3. rdan

    rdan Well-Known Member

    5,439
    1,398
    113
    May 25, 2014
    Ratings:
    +2,187
    Local Time:
    11:14 AM
    Mainline
    10.2
    yes .08 beta 2
     
  4. eva2000

    eva2000 Administrator Staff Member

    53,461
    12,128
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,668
    Local Time:
    1:14 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    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
  5. rdan

    rdan Well-Known Member

    5,439
    1,398
    113
    May 25, 2014
    Ratings:
    +2,187
    Local Time:
    11:14 AM
    Mainline
    10.2
    Still happening on latest install.
    Because this code is present on php.conf
     
  6. eva2000

    eva2000 Administrator Staff Member

    53,461
    12,128
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,668
    Local Time:
    1:14 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    do these commands fix it ?

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

    rdan Well-Known Member

    5,439
    1,398
    113
    May 25, 2014
    Ratings:
    +2,187
    Local Time:
    11:14 AM
    Mainline
    10.2
    I already fixed it, by editing manually :(
     
  8. eva2000

    eva2000 Administrator Staff Member

    53,461
    12,128
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,668
    Local Time:
    1:14 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  9. rdan

    rdan Well-Known Member

    5,439
    1,398
    113
    May 25, 2014
    Ratings:
    +2,187
    Local Time:
    11:14 AM
    Mainline
    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

    53,461
    12,128
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,668
    Local Time:
    1:14 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    doh guess I missed that - will look into it :)
     
  11. eva2000

    eva2000 Administrator Staff Member

    53,461
    12,128
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,668
    Local Time:
    1:14 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+