Join the community today
Register Now

Nginx Several domains keep returning after deletion

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by RB1, Aug 30, 2017.

  1. RB1

    RB1 Active Member

    281
    72
    28
    Nov 11, 2016
    California
    Ratings:
    +119
    Local Time:
    2:56 PM
    Nginx 1.13.x
    MariaDB 10.1.x
    • CentOS Version: CentOS 7 64bit ?
    • Centmin Mod Version Installed: 123.09beta01
    • Nginx Version Installed: 1.13.4
    • PHP Version Installed: 7.0.19
    • MariaDB MySQL Version Installed: 10.1.26
    • When was last time updated Centmin Mod code base ? : Daily
    • Persistent Config:
      Code (Text):
      NGXDYNAMIC_NGXPAGESPEED='y'
      NGINX_PAGESPEED='y'
      LETSENCRYPT_DETECT='y'
      ENABLEMOTD_CSFMSG='n'
      ENABLEMOTD_LINKSMSG='n'
      PHP_PGO='y'
    Can't seem to figure out what the issue here is. I have a couple domains that are returning after I deleted them. It's not instant; sometimes they come back after a couple hours to maybe a full day. Weird, right?

    From what I can tell, they only return to /home/nginx/domains with an empty /public/ folder.
    No domain.conf file in /usr/local/nginx/conf/conf.d

    One of the domains I removed manually by deleting the domain folder and vhost file followed by restarting nginx.

    For the other I used these steps:
    Code (Text):
    rm -rf /usr/local/nginx/conf/conf.d/domain.com.conf
     rm -rf /usr/local/nginx/conf/conf.d/domain.com.ssl.conf
     rm -rf /usr/local/nginx/conf/ssl/domain.com/domain.com.crt
     rm -rf /usr/local/nginx/conf/ssl/domain.com/domain.com.key
     rm -rf /usr/local/nginx/conf/ssl/domain.com/domain.com.csr
     rm -rf /usr/local/nginx/conf/ssl/domain.com
     rm -rf /home/nginx/domains/domain.com
     service nginx restart
    Any idea? This has been going on for months.

    Edit: Also thought it could have been something in cron, but I don't think so after looking at it:
    Code (Text):
    11 */23 * * * /usr/local/src/centminmod/tools/autoprotect.sh 2>/dev/null
    0 */4 * * * /usr/bin/cminfo_updater 2>/dev/null
    #*/15 * * * * sleep 297s ; wget -O - -q -t 1 http://domain.com/wp-cron.php?doing_wp_cron=1 > /dev/null 2>&1
    0 */12 * * * sleep 221s ;/root/tools/wp_updater_domain.com.sh >/dev/null 2>&1
    0 0 * * * "/root/.acme.sh"/acme.sh --cron --home "/root/.acme.sh" > /dev/null
    15 */3 * * * /root/tools/updatecm.sh 2>/dev/null
     
  2. eva2000

    eva2000 Administrator Staff Member

    30,569
    6,854
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,274
    Local Time:
    8:56 AM
    Nginx 1.13.x
    MariaDB 5.5
    wow never heard that happen before

    Do these domains by any chance use letsencrypt ssl certificates issued via centmin mod's acemtool.sh and integrated letsencrypt routines ? Could be related to acme.sh cron trying to renew letsencrypt ssl certs

    does accompanying directory at /usr/local/nginx/conf/ssl/domain.com also return ?
     
    • Like Like x 1
  3. RB1

    RB1 Active Member

    281
    72
    28
    Nov 11, 2016
    California
    Ratings:
    +119
    Local Time:
    2:56 PM
    Nginx 1.13.x
    MariaDB 10.1.x
    Nothing related in /usr/local/nginx/conf/ssl/
    I do see /root/.acme.sh/domain.com for one of my problematic domains. I'll delete this folder and see what happens in the next couple of days

    Thanks!
     
  4. eva2000

    eva2000 Administrator Staff Member

    30,569
    6,854
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,274
    Local Time:
    8:56 AM
    Nginx 1.13.x
    MariaDB 5.5
    yeah that might be it, i updated 123.09beta01 and centminmod.com site instructions to remove that directory too now
     
    • Useful Useful x 1
  5. RB1

    RB1 Active Member

    281
    72
    28
    Nov 11, 2016
    California
    Ratings:
    +119
    Local Time:
    2:56 PM
    Nginx 1.13.x
    MariaDB 10.1.x
    Update: Yes, the steps you explained fixed the problem!
    Thanks :)
     
    • Like Like x 1
  6. eva2000

    eva2000 Administrator Staff Member

    30,569
    6,854
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,274
    Local Time:
    8:56 AM
    Nginx 1.13.x
    MariaDB 5.5
    excellent :)