Learn about Centmin Mod LEMP Stack today
Become a Member

Beta Branch add NGINX_MAXERRBYTELIMIT variable to adjust NGX_MAX_ERROR_STR hardco…

Discussion in 'Centmin Mod Github Commits' started by eva2000, Feb 22, 2017.

  1. eva2000

    eva2000 Administrator Staff Member

    53,190
    12,113
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,649
    Local Time:
    12:07 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    add NGINX_MAXERRBYTELIMIT variable to adjust NGX_MAX_ERROR_STR hardcoded value

    can be set in persistent config file /etc/centminmod/custom_config.inc prior to nginx recompile via centmin.sh menu option 4 to modify nginx hard coded value for NGX_MAX_ERROR_STR which is defaults to 2048 bytes. Some web apps like naxsi and lua nginx module may need raising the value to 4096 or 8192 Lua Ngx API - OpenResty Reference

    Code (Text):
    NGINX_MAXERRBYTELIMIT='2048' # modify NGX_MAX_ERROR_STR hardcoded 2048 limit by editing value i.e. http://openresty-reference.readthedocs.io/en/latest/Lua_Nginx_API/#print
    


    Continue reading...

    123.09beta01 branch


     
  2. eva2000

    eva2000 Administrator Staff Member

    53,190
    12,113
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,649
    Local Time:
    12:07 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    example of setting in persistent config file /etc/centminmod/custom_config.inc
    Code (Text):
    NGINX_MAXERRBYTELIMIT='4096'
    

    then doing centmin.sh menu option 4 recompile of nginx and grepping nginx upgrade log for mention of NGX_MAX_ERROR_STR
    Code (Text):
    grep -C4 -rnw 'NGX_MAX_ERROR_STR' /root/centminlogs/ 
    

    Code (Text):
    grep -C4 -rnw 'NGX_MAX_ERROR_STR' /root/centminlogs/ 
    /root/centminlogs/centminmod_1.2.3-eva2000.09.004_210217-194043_nginx_upgrade.log-3911-static u_char ngx_http_server_build_string[] = "Server: " NGINX_VER_BUILD CRLF;
    /root/centminlogs/centminmod_1.2.3-eva2000.09.004_210217-194043_nginx_upgrade.log-3912-
    /root/centminlogs/centminmod_1.2.3-eva2000.09.004_210217-194043_nginx_upgrade.log-3913-Change server string to nginx centminmod
    /root/centminlogs/centminmod_1.2.3-eva2000.09.004_210217-194043_nginx_upgrade.log-3914-
    /root/centminlogs/centminmod_1.2.3-eva2000.09.004_210217-194043_nginx_upgrade.log:3915:NGX_MAX_ERROR_STR value
    /root/centminlogs/centminmod_1.2.3-eva2000.09.004_210217-194043_nginx_upgrade.log:3916:#define NGX_MAX_ERROR_STR   4096
    /root/centminlogs/centminmod_1.2.3-eva2000.09.004_210217-194043_nginx_upgrade.log-3917-
    /root/centminlogs/centminmod_1.2.3-eva2000.09.004_210217-194043_nginx_upgrade.log-3918-689:    gcf->country = GeoIP_open((char *) value[1].data, GEOIP_MEMORY_CACHE);
    /root/centminlogs/centminmod_1.2.3-eva2000.09.004_210217-194043_nginx_upgrade.log-3919-744:    gcf->org = GeoIP_open((char *) value[1].data, GEOIP_MEMORY_CACHE);
    /root/centminlogs/centminmod_1.2.3-eva2000.09.004_210217-194043_nginx_upgrade.log-3920-805:    gcf->city = GeoIP_open((char *) value[1].data, GEOIP_MEMORY_CACHE);