Welcome to Centmin Mod Community
Become a Member

Nginx bug on latest .08 Beta branch?

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

Tags:
  1. rdan

    rdan Premium Member Premium Member

    4,223
    1,027
    113
    May 25, 2014
    Ratings:
    +1,467
    Local Time:
    3:32 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

     
    • Like Like x 1
  2. eva2000

    eva2000 Administrator Staff Member

    35,061
    7,740
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +11,935
    Local Time:
    5:32 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    what does nginx -V output show (wrap in QUOTE tags)

    .08 beta 02 ?
     
  3. rdan

    rdan Premium Member Premium Member

    4,223
    1,027
    113
    May 25, 2014
    Ratings:
    +1,467
    Local Time:
    3:32 AM
    Mainline
    10.2
    yes .08 beta 2
     
    • Like Like x 1
  4. eva2000

    eva2000 Administrator Staff Member

    35,061
    7,740
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +11,935
    Local Time:
    5:32 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    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/[email protected] · 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. rdan

    rdan Premium Member Premium Member

    4,223
    1,027
    113
    May 25, 2014
    Ratings:
    +1,467
    Local Time:
    3:32 AM
    Mainline
    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

    35,061
    7,740
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +11,935
    Local Time:
    5:32 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    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 Premium Member Premium Member

    4,223
    1,027
    113
    May 25, 2014
    Ratings:
    +1,467
    Local Time:
    3:32 AM
    Mainline
    10.2
    I already fixed it, by editing manually :(
     
  8. eva2000

    eva2000 Administrator Staff Member

    35,061
    7,740
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +11,935
    Local Time:
    5:32 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    • Like Like x 1
  9. rdan

    rdan Premium Member Premium Member

    4,223
    1,027
    113
    May 25, 2014
    Ratings:
    +1,467
    Local Time:
    3:32 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

    35,061
    7,740
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +11,935
    Local Time:
    5:32 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    doh guess I missed that - will look into it :)
     
    • Like Like x 1
  11. eva2000

    eva2000 Administrator Staff Member

    35,061
    7,740
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +11,935
    Local Time:
    5:32 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
..