Get the most out of your Centmin Mod LEMP stack
Become a Member

Master 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

    28,968
    6,575
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,758
    Local Time:
    3:20 PM
    Nginx 1.13.x
    MariaDB 5.5
    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...

    Centmin Mod Github Master branch

    Master branch is where most recent commits are made as at May 24, 2015.