Discover Centmin Mod today
Register Now

Beta Branch update tools/nvwp.sh & inc/wpsetup.inc separate xmlrpc.php rate limit

Discussion in 'Centmin Mod Github Commits' started by eva2000, Oct 9, 2015.

  1. eva2000

    eva2000 Administrator Staff Member

    55,163
    12,249
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,825
    Local Time:
    4:12 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    update tools/nvwp.sh & inc/wpsetup.inc separate xmlrpc.php rate limit

    separate the nginx request rate liming zones for xmlrpc.php from wp-login.php's rate limit zone as some folks actually use wordpress ping backs vix xmlrpc.php https://community.centminmod.com/posts/19420/

    existing wordpress uses who created and installed wordpress via centmin.sh menu option 22 can add the separate xmlrpc.php rate limit zone via these SSH commands

    Code:
    sed -i 's/http {/http { \nlimit_req_zone $binary_remote_addr zone=xwprpc:10m rate=30r\/s;\n/g' /usr/local/nginx/conf/nginx.conf
    
    then edit wordpress vhost file and change

    from


    Code:
    location ~* /(xmlrpc\.php) {
        limit_req zone=xwplogin burst=2 nodelay;
        #limit_conn xwpconlimit 30;
        include /usr/local/nginx/conf/php-wpsc.conf;
    }
    
    to

    Code:
    location ~* /(xmlrpc\.php) {
        limit_req zone=xwprpc burst=45 nodelay;
        #limit_conn xwpconlimit 30;
        include /usr/local/nginx/conf/php-wpsc.conf;
    }
    
    and restart nginx

    Continue reading...

    123.09beta01 branch