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

Wordpress The connection was reset

Discussion in 'Blogs & CMS usage' started by Yohan, Oct 4, 2015.

  1. Yohan

    Yohan Member

    68
    3
    8
    Sep 24, 2015
    Ratings:
    +4
    Local Time:
    4:01 PM
    1.9.x
    MariaDB 10
    Hello , I recently having issue some of my WP post its apering "The connection was reset" hope any one have idea ? :(

     
  2. eva2000

    eva2000 Administrator Staff Member

    54,860
    12,239
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,810
    Local Time:
    8:31 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Where are you seeing that message. I don't think I've see such for WP posts specifically
     
  3. Yohan

    Yohan Member

    68
    3
    8
    Sep 24, 2015
    Ratings:
    +4
    Local Time:
    4:01 PM
    1.9.x
    MariaDB 10
    I just send you PM ... there few of post will getting this error ... but main site is working .. even there no error log has any issue .. its not mention anything about that
     
  4. eva2000

    eva2000 Administrator Staff Member

    54,860
    12,239
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,810
    Local Time:
    8:31 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    what about your nginx vhost's access log ?

    i get
    Code:
    No data received
    
    ERR_EMPTY_RESPONSE
    
    Unable to load the webpage because the server sent no data.
    did you enable the block.conf include in your vhost centminmod/block.conf at master · centminmod/centminmod · GitHub it has some spam and adult related keyword blocks that might be catching your site as it's adult content related

    although they're 403 permission denied codes so not what you see
    Code:
        ## Block spam
        set $block_spam 0;
        if ($query_string ~ "\b(ultram|unicauca|valium|viagra|vicodin|xanax|ypxaieo)\b") {
            set $block_spam 1;
        }
        if ($query_string ~ "\b(erections|hoodia|huronriveracres|impotence|levitra|libido)\b") {
            set $block_spam 1;
        }
        if ($query_string ~ "\b(ambien|blue\spill|cialis|cocaine|ejaculation|erectile)\b") {
            set $block_spam 1;
        }
        if ($query_string ~ "\b(lipitor|phentermin|pro[sz]ac|sandyauer|tramadol|troyhamby)\b") {
            set $block_spam 1;
        }
        if ($block_spam = 1) {
            return 403;
        }
     
  5. Yohan

    Yohan Member

    68
    3
    8
    Sep 24, 2015
    Ratings:
    +4
    Local Time:
    4:01 PM
    1.9.x
    MariaDB 10
    OK i just removed that line .... error still the same ... YES the your toll error msg from chorme .. im using Firefox .. any idea ?
     
  6. eva2000

    eva2000 Administrator Staff Member

    54,860
    12,239
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,810
    Local Time:
    8:31 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    did you restart nginx server and php-fpm after ?
    Code:
    nprestart
     
  7. Yohan

    Yohan Member

    68
    3
    8
    Sep 24, 2015
    Ratings:
    +4
    Local Time:
    4:01 PM
    1.9.x
    MariaDB 10
    YES sure ..

    Code:
    [root@a169 ~]# nprestart
    Restarting nginx (via systemctl):                          [  OK  ]
    Gracefully shutting down php-fpm . done
    Starting php-fpm  done
    [root@a169 ~]#
    
     
  8. eva2000

    eva2000 Administrator Staff Member

    54,860
    12,239
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,810
    Local Time:
    8:31 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    also check all instances of dropping connections with 444 nginx status code in your nginx vhost files

    find which files have 444 text in them
    Code:
    grep -Ro 444 /usr/local/nginx/conf | uniq
    
    example 3 files i have
    Code:
    grep -Ro 444 /usr/local/nginx/conf | uniq
    /usr/local/nginx/conf/wpsecure_newdomain2.com.conf:444
    /usr/local/nginx/conf/drop.conf:444
    /usr/local/nginx/conf/wpsecure_newdomain.com.conf:444
    check most obvious drop.conf as it's included to all nginx vhosts by default
    Code:
    grep -n 444 /usr/local/nginx/conf/drop.conf
    
    7:      location ~* \.(bak|php~|php#|php.save|php.swp|php.swo)$ { return 444; }
    any of those extensions specicially will give 444 status code and end the connection without returning a response i.e. if it ended in filename.php.swp

    not applicable to you

    next check wordpress auto installer centmin.sh menu option 22 generated wpsecure_yourdomain.com.conf include files

    Code:
    grep -C4 -n 444 /usr/local/nginx/conf/wpsecure_newdomain.com.conf
    21-
    22-# Make sure files with the following extensions do not get loaded by nginx because nginx would display the source code, and these files can contain PASSWORDS!
    23-location ~* \.(engine|inc|info|install|make|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)$|^(\..*|Entries.*|Repository|Root|Tag|Template)$|\.php_
    24-{
    25:return 444;
    26-}
    27-
    28-#nocgi
    29-location ~* \.(pl|cgi|py|sh|lua)$ {
    30:return 444;
    31-}
    32-
    33-#disallow
    34-location ~* (roundcube|webdav|smtp|http\:|soap|w00tw00t) {
    35:return 444;
    36-}
    37-
    38-location ~ /(\.|wp-config\.php|wp-config\.txt|readme\.html|license\.txt) { deny all; }
    could be something in your wordpress post title/url matching something like 'soap', checking the url you gave me it has that word !
    Code:
    -soapland-
    hmm might remove that word soap from this list hehe
    Code:
    location ~* (roundcube|webdav|smtp|http\:|soap|w00tw00t) {
     
  9. eva2000

    eva2000 Administrator Staff Member

    54,860
    12,239
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,810
    Local Time:
    8:31 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    updated stable and beta's with fix too update tools/nvwp.sh and inc/wpsetup.inc remove url blocks · centminmod/centminmod@a627245 · GitHub

    Updated both Centmin Mod 123.08stable and 123.09beta01 builds

    To update your Centmin Mod builds follow instructions at centminmod.com/upgrade.html and respective version threads below:
    for existing installs of wordpress edit the wpsecure_yourdomain.conf include and change the lines as per update tools/nvwp.sh and inc/wpsetup.inc remove url blocks · centminmod/centminmod@a627245 · GitHub
     
  10. Yohan

    Yohan Member

    68
    3
    8
    Sep 24, 2015
    Ratings:
    +4
    Local Time:
    4:01 PM
    1.9.x
    MariaDB 10
    Haha... its working !! :)
     
  11. eva2000

    eva2000 Administrator Staff Member

    54,860
    12,239
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,810
    Local Time:
    8:31 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    soap ain't a bad thing afterall ! :D
     
  12. Yohan

    Yohan Member

    68
    3
    8
    Sep 24, 2015
    Ratings:
    +4
    Local Time:
    4:01 PM
    1.9.x
    MariaDB 10
    Hahaha .. finally ... but this issue really annoying me last night .. i didn't even slep well ..