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

Install Nginx Again>> Geoip 2 Lite not working..

Discussion in 'Install & Upgrades or Pre-Install Questions' started by EckyBrazzz, Jun 30, 2019.

Tags:
  1. EckyBrazzz

    EckyBrazzz Active Member

    685
    137
    43
    Mar 28, 2018
    >>>>Click here<<<< i'm nearby......
    Ratings:
    +255
    Local Time:
    12:33 PM
    1.17.x
    10.3.x
    As Nginx - How to enable GeoIP 2 Lite Nginx Module Support ? is still mentioned with new users I followd that guide but did not sucseed in getting geop-2 lite working.

    I compared the files to my old sever, but at first sight they seem to be identical. I don't know it there were any changes in CMM, (guess YES due the commits made).

    In my /etc/centminmod/custom_config.inc are present:
    Code (Text):
    NGINX_GEOIPTWOLITE='y'
    NGXDYNAMIC_GEOIPTWOLITE='y'
    

    After recompline of Nginx
    Code (Text):
    ls -lah /usr/share/GeoIP| grep GeoLite2
    -rw-r--r--.   1 root root 6.3M Jun 25 15:06 GeoLite2-ASN.mmdb
    -rw-r--r--.   1 root root 3.5M Jun 25 15:06 GeoLite2-ASN.tar.gz
    -rw-r--r--.   1 root root  58M Jun 24 18:27 GeoLite2-City.mmdb
    -rw-r--r--.   1 root root  28M Jun 24 18:27 GeoLite2-City.tar.gz
    -rw-r--r--.   1 root root 3.7M Jun 24 18:22 GeoLite2-Country.mmdb
    -rw-r--r--.   1 root root 1.9M Jun 24 18:22 GeoLite2-Country.tar.gz
    

    The Cron is there
    Code (Text):
    crontab -l | grep geoip2db
    20 2 * * 4 /usr/local/src/centminmod/tools/geoip2db-update.sh >/dev/null 2>&1
    

    Nginx -V shows that it done correclty
    The ngx_http_geoip2_module.so dynamic module is loading
    @eva2000 add this to the manual so that users can find the correct ngixn process and don't make a mistake when testing
    Code (Text):
    ps aux | grep -i nginx
    root     13688  0.0  0.0 112760   992 pts/0    S+   05:16   0:00 grep --color=auto -i nginx


    Code (Text):
    l
    lsof -p 13688 | grep .so | grep geo    
    nginx   13688 nginx  mem       REG              253,1    23072 21124729 /usr/local/nginx/modules/ngx_http_geoip2_module.so
    

    and for GeoIP legacy and GeoIP 2 Lite databases
    Code (Text):
    lsof -p 13688 | grep GeoIP  
    nginx   13688 nginx  mem       REG              253,1  6566278 13788332 /usr/share/GeoIP/GeoLite2-ASN.mmdb
    nginx   13688 nginx  mem       REG              253,1 60402747 13788334 /usr/share/GeoIP/GeoLite2-City.mmdb
    nginx   13688 nginx  mem       REG              253,1   197136   240719 /usr/lib64/libGeoIP.so.1.5.0
    nginx   13688 nginx    7r      REG              253,1  1242574 13813239 /usr/share/GeoIP/GeoIP.dat
    nginx   13688 nginx    8r      REG              253,1 20539238 12584298 /usr/share/GeoIP/GeoIPCity.dat
    

    I have commented out in my /usr/local/nginx/conf/geoip.conf the include /usr/local/nginx/conf/geoip2.conf;
    Code (Text):
    # GeoIP2 Lite databases
    #include /usr/local/nginx/conf/geoip2.conf;
    

    Nginx does not give a error, removing the hash include /usr/local/nginx/conf/geoip2.conf; gives an error.
    Content /usr/local/nginx/conf/geoip2.conf
    Code (Text):
    cat /usr/local/nginx/conf/geoip2.conf
    # GeoIP2 Lite databases
      #  geoip2 /usr/share/GeoIP/GeoLite2-Country.mmdb {
      #    auto_reload 5m;
      #    $geoip2_metadata_country_build metadata build_epoch;
      #    $geoip2_data_country_code country iso_code;
      #    $geoip2_data_country_name country names en;
      #  }
    
      geoip2 /usr/share/GeoIP/GeoLite2-City.mmdb {
        auto_reload 5m;
        $geoip2_metadata_city_build metadata build_epoch;
        $geoip2_data_city_name city names en;
        $geoip2_data_city_geonameid city geoname_id;
        $geoip2_data_continent_code continent code;
        $geoip2_data_continent_geonameid continent geoname_id;
        $geoip2_data_continent_name continent names en;
        $geoip2_data_country_geonameid country geoname_id;
        $geoip2_data_country_code country iso_code;
        $geoip2_data_country_name country names en;
        $geoip2_data_country_is_eu country is_in_european_union;
        $geoip2_data_location_accuracyradius location accuracy_radius;
        $geoip2_data_location_latitude location latitude;
        $geoip2_data_location_longitude location longitude;
        $geoip2_data_location_metrocode location metro_code;
        $geoip2_data_location_timezone location time_zone;
        $geoip2_data_postal_code postal code;
        $geoip2_data_rcountry_geonameid registered_country geoname_id;
        $geoip2_data_rcountry_iso registered_country iso_code;
        $geoip2_data_rcountry_name registered_country names en;
        $geoip2_data_rcountry_is_eu registered_country is_in_european_union;
        $geoip2_data_region_geonameid subdivisions 0 geoname_id;
        $geoip2_data_region_iso subdivisions 0 iso_code;
        $geoip2_data_region_name subdivisions 0 names en;
      }
    
      geoip2 /usr/share/GeoIP/GeoLite2-ASN.mmdb {
        auto_reload 5m;
        $geoip2_data_autonomous_system_number autonomous_system_number;
        $geoip2_data_autonomous_system_organization autonomous_system_organization;
    }
    

    With these setting on my new server it does not show the GEOPIP2 in the php.info file, on the old server it still gives the correct Geoip 2 info....:banghead::banghead::banghead:

    Currente time is 2:24AM, but need to diffcheck some more files to find out whats wrong, any ideas in the meantime are welcome!
     
  2. eva2000

    eva2000 Administrator Staff Member

    41,645
    9,380
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,408
    Local Time:
    1:33 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    commenting out geoip2.conf will disable geoip2 lite nginx module's registered/mapped variables ;)
     
  3. EckyBrazzz

    EckyBrazzz Active Member

    685
    137
    43
    Mar 28, 2018
    >>>>Click here<<<< i'm nearby......
    Ratings:
    +255
    Local Time:
    12:33 PM
    1.17.x
    10.3.x
    Yeah, did some testing with enable and disable, but noticed that you did not read completely the current setup as is in the post. First I got an error when removing the Hash, missing some city thing, but just changed my IP with a VPN to hide my real one and lost connection with the server, on reconnecting this info was gone.

    I don't get the Geo IP 2 Project_CMM_7266.png
     
  4. EckyBrazzz

    EckyBrazzz Active Member

    685
    137
    43
    Mar 28, 2018
    >>>>Click here<<<< i'm nearby......
    Ratings:
    +255
    Local Time:
    12:33 PM
    1.17.x
    10.3.x
    FYI, Before getting confused again when writing at the same time the other post was made with the Hash removed from the file, without any error on Nginx.
     
  5. eva2000

    eva2000 Administrator Staff Member

    41,645
    9,380
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,408
    Local Time:
    1:33 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    what's output for this command to do a diff compare and show only differences between the default php.conf include file and the php-geoip2.conf include file which has geoip2 lite fastcgi param variables you need to add to your php.conf manually as per Nginx - How to enable GeoIP 2 Lite Nginx Module Support ?

    Code (Text):
    sdiff -w200 -s /usr/local/nginx/conf/php.conf /usr/local/nginx/conf/php-geoip2.conf


    example shows php.conf missing the GEOIP2 mapping variables which php-geoip2.conf has - you need to manually add those into php.conf include file at /usr/local/nginx/conf/php.conf
    Code (Text):
    sdiff -w200 -s /usr/local/nginx/conf/php.conf /usr/local/nginx/conf/php-geoip2.conf
                              >  fastcgi_param GEOIP2_CITY $geoip2_data_city_name;
                              >  fastcgi_param GEOIP2_CITY_GEONAMEID $geoip2_data_city_geonameid;
                              >  fastcgi_param GEOIP2_CONTINENT_CODE $geoip2_data_continent_code;
                              >  fastcgi_param GEOIP2_CONTINENT_GEONAMEID $geoip2_data_continent_geonameid;
                              >  fastcgi_param GEOIP2_CONTINENT_NAME $geoip2_data_continent_name;
                              >  fastcgi_param GEOIP2_COUNTRY_GEONAMEID $geoip2_data_country_geonameid;
                              >  fastcgi_param GEOIP2_COUNTRY_ISO_CODE $geoip2_data_country_iso;
                              >  fastcgi_param GEOIP2_COUNTRY $geoip2_data_country_name;
                              >  fastcgi_param GEOIP2_COUNTRY_IN_EU $geoip2_data_country_is_eu;
                              >  fastcgi_param GEOIP2_LOCATION_ACCURACY_RADIUS $geoip2_data_location_accuracyradius;
                              >  fastcgi_param GEOIP2_LATITUDE $geoip2_data_location_latitude;
                              >  fastcgi_param GEOIP2_LONGITUDE $geoip2_data_location_longitude;
                              >  fastcgi_param GEOIP2_LOCATION_METROCODE $geoip2_data_location_metrocode;
                              >  fastcgi_param GEOIP2_LOCATION_TIMEZONE $geoip2_data_location_timezone;
                              >  fastcgi_param GEOIP2_POSTAL_CODE $geoip2_data_postal_code;
                              >  fastcgi_param GEOIP2_REGISTERED_COUNTRY_GEONAMEID $geoip2_data_rcountry_geonameid;
                              >  fastcgi_param GEOIP2_REGISTERED_COUNTRY_ISO $geoip2_data_rcountry_iso;
                              >  fastcgi_param GEOIP2_REGISTERED_COUNTRY_NAME $geoip2_data_rcountry_name;
                              >  fastcgi_param GEOIP2_REGISTERED_COUNTRY_IN_EU $geoip2_data_rcountry_is_eu;
                              >  fastcgi_param GEOIP2_REGION_GEONAMEID $geoip2_data_region_geonameid;
                              >  fastcgi_param GEOIP2_REGION $geoip2_data_region_iso;
                              >  fastcgi_param GEOIP2_REGION_NAME $geoip2_data_region_name;
    
     
  6. EckyBrazzz

    EckyBrazzz Active Member

    685
    137
    43
    Mar 28, 2018
    >>>>Click here<<<< i'm nearby......
    Ratings:
    +255
    Local Time:
    12:33 PM
    1.17.x
    10.3.x
    Strange... I did the diff on both servers
    Code (Text):
    [09:04][[email protected] ~]# sdiff -w200 -s /usr/local/nginx/conf/php.conf /usr/local/nginx/conf/php-geoip2.conf
        fastcgi_keep_conn on;                                                                          |        fastcgi_pass   127.0.0.1:9000;
        fastcgi_pass dft_php;                                                                          <
        #fastcgi_pass   127.0.0.1:9000;                                                                <
    fastcgi_param GEOIP_LONGITUDE $geoip_longitude;                                                    |
    fastcgi_param GEOIP2_CITY_BUILD_DATE $geoip2_metadata_city_build;                                  <
    fastcgi_param GEOIP2_COUNTRY_CODE $geoip2_data_country_code;                                       |    fastcgi_param GEOIP2_COUNTRY_ISO_CODE $geoip2_data_country_iso;
    fastcgi_param GEOIP2_COUNTRY_NAME $geoip2_data_country_name;                                       |    fastcgi_param GEOIP2_COUNTRY $geoip2_data_country_name;
    fastcgi_param GEOIP2_ASN $geoip2_data_autonomous_system_number;                                    <
    fastcgi_param GEOIP2_ASN_ORG $geoip2_data_autonomous_system_organization;                          <
                       }                                                                               /                       }
    

    Code (Text):
    [09:04][[email protected] ~]# sdiff -w200 -s /usr/local/nginx/conf/php.conf /usr/local/nginx/conf/php-geoip2.conf
    fastcgi_param GEOIP2_CITY_BUILD_DATE $geoip2_metadata_city_build;                                  |
    fastcgi_param GEOIP2_CITY $geoip2_data_city_name;                                                  |    fastcgi_param GEOIP2_CITY_BUILD_DATE $geoip2_metadata_city_build;
    fastcgi_param GEOIP2_CITY_GEONAMEID $geoip2_data_city_geonameid;                                   |    fastcgi_param GEOIP2_CITY $geoip2_data_city_name;
    fastcgi_param GEOIP2_CONTINENT_CODE $geoip2_data_continent_code;                                   |    fastcgi_param GEOIP2_CITY_GEONAMEID $geoip2_data_city_geonameid;
    fastcgi_param GEOIP2_CONTINENT_GEONAMEID $geoip2_data_continent_geonameid;                         |    fastcgi_param GEOIP2_CONTINENT_CODE $geoip2_data_continent_code;
    fastcgi_param GEOIP2_CONTINENT_NAME $geoip2_data_continent_name;                                   |    fastcgi_param GEOIP2_CONTINENT_GEONAMEID $geoip2_data_continent_geonameid;
    fastcgi_param GEOIP2_COUNTRY_GEONAMEID $geoip2_data_country_geonameid;                             |    fastcgi_param GEOIP2_CONTINENT_NAME $geoip2_data_continent_name;
    fastcgi_param GEOIP2_COUNTRY_CODE $geoip2_data_country_code;                                       |    fastcgi_param GEOIP2_COUNTRY_GEONAMEID $geoip2_data_country_geonameid;
    fastcgi_param GEOIP2_COUNTRY_NAME $geoip2_data_country_name;                                       |    fastcgi_param GEOIP2_COUNTRY_CODE $geoip2_data_country_code;
    fastcgi_param GEOIP2_COUNTRY_IN_EU $geoip2_data_country_is_eu;                                     |    fastcgi_param GEOIP2_COUNTRY_NAME $geoip2_data_country_name;
    fastcgi_param GEOIP2_LOCATION_ACCURACY_RADIUS $geoip2_data_location_accuracyradius;                |    fastcgi_param GEOIP2_COUNTRY_IN_EU $geoip2_data_country_is_eu;
    fastcgi_param GEOIP2_LATITUDE $geoip2_data_location_latitude;                                      |    fastcgi_param GEOIP2_LOCATION_ACCURACY_RADIUS $geoip2_data_location_accuracyradius;
    fastcgi_param GEOIP2_LONGITUDE $geoip2_data_location_longitude;                                    |    fastcgi_param GEOIP2_LATITUDE $geoip2_data_location_latitude;
    fastcgi_param GEOIP2_LOCATION_METROCODE $geoip2_data_location_metrocode;                           |    fastcgi_param GEOIP2_LONGITUDE $geoip2_data_location_longitude;
    fastcgi_param GEOIP2_LOCATION_TIMEZONE $geoip2_data_location_timezone;                             |    fastcgi_param GEOIP2_LOCATION_METROCODE $geoip2_data_location_metrocode;
    fastcgi_param GEOIP2_POSTAL_CODE $geoip2_data_postal_code;                                         |    fastcgi_param GEOIP2_LOCATION_TIMEZONE $geoip2_data_location_timezone;
    fastcgi_param GEOIP2_REGISTERED_COUNTRY_GEONAMEID $geoip2_data_rcountry_geonameid;                 |    fastcgi_param GEOIP2_POSTAL_CODE $geoip2_data_postal_code;
    fastcgi_param GEOIP2_REGISTERED_COUNTRY_ISO $geoip2_data_rcountry_iso;                             |    fastcgi_param GEOIP2_REGISTERED_COUNTRY_GEONAMEID $geoip2_data_rcountry_geonameid;
    fastcgi_param GEOIP2_REGISTERED_COUNTRY_NAME $geoip2_data_rcountry_name;                           |    fastcgi_param GEOIP2_REGISTERED_COUNTRY_ISO $geoip2_data_rcountry_iso;
    fastcgi_param GEOIP2_REGISTERED_COUNTRY_IN_EU $geoip2_data_rcountry_is_eu;                         |    fastcgi_param GEOIP2_REGISTERED_COUNTRY_NAME $geoip2_data_rcountry_name;
    fastcgi_param GEOIP2_REGION_GEONAMEID $geoip2_data_region_geonameid;                               |    fastcgi_param GEOIP2_REGISTERED_COUNTRY_IN_EU $geoip2_data_rcountry_is_eu;
    fastcgi_param GEOIP2_REGION $geoip2_data_region_iso;                                               |    fastcgi_param GEOIP2_REGION_GEONAMEID $geoip2_data_region_geonameid;
    fastcgi_param GEOIP2_REGION_NAME $geoip2_data_region_name;                                         |    fastcgi_param GEOIP2_REGION $geoip2_data_region_iso;
    fastcgi_param GEOIP2_ASN $geoip2_data_autonomous_system_number;                                    |    fastcgi_param GEOIP2_REGION_NAME $geoip2_data_region_name;
                                                                                                       >
                                                                                                       >    fastcgi_param GEOIP2_ASN $geoip2_data_autonomous_system_number;
                       }                                                                               /                       }
    

    This php.conf does not look like this one one Github centminmod/centminmod, a suggestion you did too copy it from there in another issue.

    the include /usr/local/nginx/conf/php.conf; --> I never saw that inside a vhost before, could be a misunderstanding with your explanation.
    Code (Text):
    [09:07][[email protected] ~]# cat /usr/local/nginx/conf/conf.d/[domain1].ssl.conf
    
    #x# HTTPS-DEFAULT
     server {
      
       server_name [domain1] www.[domain1];
       return 302 https://[domain1]$request_uri;
       include /usr/local/nginx/conf/staticfiles.conf;
     }
    
    server {
      listen 443 ssl http2;
      server_name [domain1] www.[domain1];
    
      include /usr/local/nginx/conf/ssl/[domain1]/[domain1].crt.key.conf;
      include /usr/local/nginx/conf/ssl_include.conf;
    
      # cloudflare authenticated origin pull cert community.centminmod.com/threads/13847/
      #ssl_client_certificate /usr/local/nginx/conf/ssl/cloudflare/[domain1]/origin.crt;
      #ssl_verify_client on;
      http2_max_field_size 16k;
      http2_max_header_size 32k;
      # mozilla recommended
      ssl_ciphers TLS13-AES-128-GCM-SHA256:TLS13-AES-256-GCM-SHA384:TLS13-CHACHA20-POLY1305-SHA256:TLS13-AES-128-CCM-8-SHA256:TLS13-AES-128-CCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS;
      ssl_prefer_server_ciphers   on;
      #add_header Alternate-Protocol  443:npn-spdy/3;
    
      # before enabling HSTS line below read centminmod.com/nginx_domain_dns_setup.html#hsts
      #add_header Strict-Transport-Security "max-age=31536000; includeSubdomains;";
      #add_header X-Frame-Options SAMEORIGIN;
      add_header X-Xss-Protection "1; mode=block" always;
      add_header X-Content-Type-Options "nosniff" always;
      #add_header Referrer-Policy "strict-origin-when-cross-origin";
      #spdy_headers_comp 5;
      ssl_buffer_size 1369;
      ssl_session_tickets on;
     
      # enable ocsp stapling
      resolver 8.8.8.8 8.8.4.4 1.1.1.1 1.0.0.1 valid=10m;
      resolver_timeout 10s;
      ssl_stapling on;
      ssl_stapling_verify on;
    
    # ngx_pagespeed & ngx_pagespeed handler
    #include /usr/local/nginx/conf/pagespeed.conf;
    #include /usr/local/nginx/conf/pagespeedhandler.conf;
    #include /usr/local/nginx/conf/pagespeedstatslog.conf;
    
      # limit_conn limit_per_ip 16;
      # ssi  on;
    
      access_log /home/nginx/domains/[domain1]/log/access.log combined buffer=256k flush=5m;
      error_log /home/nginx/domains/[domain1]/log/error.log;
    
      include /usr/local/nginx/conf/autoprotect/[domain1]/autoprotect-[domain1].conf;
      root /home/nginx/domains/[domain1]/public;
      # uncomment cloudflare.conf include if using cloudflare for
      # server and/or vhost site
      include /usr/local/nginx/conf/cloudflare.conf;
      include /usr/local/nginx/conf/503include-main.conf;
    
      #include /usr/local/nginx/conf/wpincludes/[domain1]/wpfastcgicache_include_[domain1].conf;
      include /usr/local/nginx/conf/wpincludes/[domain1]/wpcacheenabler_[domain1].conf;
      #include /usr/local/nginx/conf/wpincludes/[domain1]/wpsupercache_[domain1].conf;
      # https://community.centminmod.com/posts/18828/
      #include /usr/local/nginx/conf/wpincludes/[domain1]/rediscache_[domain1].conf; 
    
      location / {
      include /usr/local/nginx/conf/503include-only.conf;
      
      # Bad Bot Blocker
      include /usr/local/nginx/conf/ultimate-badbot-blocker/bots.d/ddos.conf;
      include /usr/local/nginx/conf/ultimate-badbot-blocker/bots.d/blockbots.conf;
     
    
      # Enables directory listings when index file not found
      #autoindex  on;
    
      # for wordpress super cache plugin
      #try_files /wp-content/cache/supercache/$http_host/$cache_uri/index.html $uri $uri/ /index.php?q=$uri&$args;
    
      # for wp cache enabler plugin
      try_files $cache_enabler_uri $uri $uri/ $custom_subdir/index.php?$args; 
    
      # Wordpress fastcgi_cache
        #try_files $uri $uri/ /index.php?$args;
    
      # Wordpress Permalinks
       #try_files $uri $uri/ /index.php?q=$uri&$args;
    
      # Nginx level redis Wordpress
      # https://community.centminmod.com/posts/18828/
      #try_files $uri $uri/ /index.php?$args;
    
      }
    
    location ~* /(wp-login\.php) {
        limit_req zone=xwplogin burst=1 nodelay;
        #limit_conn xwpconlimit 30;
        auth_basic "Private";
        auth_basic_user_file /home/nginx/domains/[domain1]/htpasswd_wplogin;  
        include /usr/local/nginx/conf/php-wpsc.conf;
      
        # https://community.centminmod.com/posts/18828/
        #include /usr/local/nginx/conf/php-rediscache.conf;
    }
    
    location ~* /(xmlrpc\.php) {
        limit_req zone=xwprpc burst=45 nodelay;
        #limit_conn xwpconlimit 30;
        include /usr/local/nginx/conf/php-wpsc.conf;
      
        # https://community.centminmod.com/posts/18828/
        #include /usr/local/nginx/conf/php-rediscache.conf;
    }
    
    location ~* /wp-admin/(load-scripts\.php) {
        limit_req zone=xwprpc burst=5 nodelay;
        #limit_conn xwpconlimit 30;
        include /usr/local/nginx/conf/php-wpsc.conf;
      
        # https://community.centminmod.com/posts/18828/
        #include /usr/local/nginx/conf/php-rediscache.conf;
    }
    
    location ~* /wp-admin/(load-styles\.php) {
        limit_req zone=xwprpc burst=5 nodelay;
        #limit_conn xwpconlimit 30;
        include /usr/local/nginx/conf/php-wpsc.conf;
      
        # https://community.centminmod.com/posts/18828/
        #include /usr/local/nginx/conf/php-rediscache.conf;
    }
    
      include /usr/local/nginx/conf/wpincludes/[domain1]/wpsecure_[domain1].conf;
      include /usr/local/nginx/conf/php-wpsc.conf;
     
      # https://community.centminmod.com/posts/18828/
      #include /usr/local/nginx/conf/php-rediscache.conf;
      include /usr/local/nginx/conf/pre-staticfiles-local-[domain1].conf;
      include /usr/local/nginx/conf/pre-staticfiles-global.conf;
      include /usr/local/nginx/conf/staticfiles.conf;
      include /usr/local/nginx/conf/drop.conf;
      #include /usr/local/nginx/conf/errorpage.conf;
      include /usr/local/nginx/conf/vts_server.conf;
    }
    
     
  7. eva2000

    eva2000 Administrator Staff Member

    41,645
    9,380
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,408
    Local Time:
    1:33 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    ah for your wordpress you'd need to add the fastcgi param into /usr/local/nginx/conf/php-wpsc.conf in your wordpress generated vhost config file not /usr/local/nginx/conf/php.conf
     
    • Winner Winner x 1
  8. EckyBrazzz

    EckyBrazzz Active Member

    685
    137
    43
    Mar 28, 2018
    >>>>Click here<<<< i'm nearby......
    Ratings:
    +255
    Local Time:
    12:33 PM
    1.17.x
    10.3.x
    Thanks, works instantly!

    Added all fastcgi param into /usr/local/nginx/conf/php-wpsc.conf and pronto.

    Should write a man page for both, with and without WordPress...

    Maybe I do it for you.

    Still, have no clue how I got it working on the other server, but with so many testing lost a bit the steps I took to get it working on that machine.
     
    • Like Like x 1
  9. EckyBrazzz

    EckyBrazzz Active Member

    685
    137
    43
    Mar 28, 2018
    >>>>Click here<<<< i'm nearby......
    Ratings:
    +255
    Local Time:
    12:33 PM
    1.17.x
    10.3.x
    Out of the nothing the GeoIP 2 Stopped working, it was perfect until last night around 22:00 local time. I changed noting on the server.

    Now I get these values and my analytics showed the time that it did not capture anymore the correct data.
    Project_CMM_7267.png
     
  10. EckyBrazzz

    EckyBrazzz Active Member

    685
    137
    43
    Mar 28, 2018
    >>>>Click here<<<< i'm nearby......
    Ratings:
    +255
    Local Time:
    12:33 PM
    1.17.x
    10.3.x
    Strange, after giving a "nprestart" it works again.
     
  11. eva2000

    eva2000 Administrator Staff Member

    41,645
    9,380
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,408
    Local Time:
    1:33 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    maybe you caught it during cronjob geoip2 lite database update via /usr/local/src/centminmod/tools/geoip2db-update.sh ? though the script should do a nginx reload after update

    check the current geoip2 city build date reported, i.e. in screenshot it would be
    Code (Text):
    date -d @1561400609
    Mon Jun 24 18:23:29 UTC 2019
    
     
  12. EckyBrazzz

    EckyBrazzz Active Member

    685
    137
    43
    Mar 28, 2018
    >>>>Click here<<<< i'm nearby......
    Ratings:
    +255
    Local Time:
    12:33 PM
    1.17.x
    10.3.x
    It gives the same result.

    Code (Text):
    [18:49][[email protected]<private> ~]# date -d @1561400609
    Mon Jun 24 18:23:29 UTC 2019
    


    Will see what happens today.
     
  13. EckyBrazzz

    EckyBrazzz Active Member

    685
    137
    43
    Mar 28, 2018
    >>>>Click here<<<< i'm nearby......
    Ratings:
    +255
    Local Time:
    12:33 PM
    1.17.x
    10.3.x
    Just ran the script manually, everything OK!
    Code (Text):
    [20:42][[email protected](private> tools]# date -d @1561989175 
    Mon Jul  1 13:52:55 UTC 2019
    
     
    • Informative Informative x 1
  14. EckyBrazzz

    EckyBrazzz Active Member

    685
    137
    43
    Mar 28, 2018
    >>>>Click here<<<< i'm nearby......
    Ratings:
    +255
    Local Time:
    12:33 PM
    1.17.x
    10.3.x
    Strange issue that GEOIP2 lite. Same problems on new server. Checked all files with diffcheck, did what that manual told me to do, but again, in WordPress no go.
    Btw I use the same setup as on the other "broken" server that still gives the correct Geoip 2 info.

    All current file can be found here:

    https://paste.ee/p/vEhEl#GVkOi6c76LrNMNKVCIuGDuVQWwohKkVK

    Any Ideas? Only given php.info is this.
    Project_CMM_7289.png
     
    Last edited: Aug 16, 2019
  15. eva2000

    eva2000 Administrator Staff Member

    41,645
    9,380
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,408
    Local Time:
    1:33 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    all looks in proper order/configuration to me
     
    • Informative Informative x 1