Welcome to Centmin Mod Community
Become a Member

Proper way to remove the default account ?

Discussion in 'Centmin Mod Insights' started by pamamolf, Oct 12, 2014.

  1. pamamolf

    pamamolf Well-Known Member

    2,487
    229
    63
    May 31, 2014
    Ratings:
    +390
    Local Time:
    7:53 AM
    Nginx-1.13.x
    MariaDB 10.1.x
    Hi

    What is the proper way to remove the default account demodomain.com created by Centminmod?

    Thanks
     
  2. eva2000

    eva2000 Administrator Staff Member

    28,942
    6,570
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,751
    Local Time:
    2:53 PM
    Nginx 1.13.x
    MariaDB 5.5
    just delete the vhost and directory
    Code:
    rm -rf /usr/local/nginx/conf/conf.d/demodomain.com.conf
    rm -rf /home/nginx/domains/demodomain.com
    ngxrestart
     
    • Like Like x 2
  3. quicksalad

    quicksalad Member

    159
    9
    18
    May 31, 2015
    Ratings:
    +13
    Local Time:
    10:23 AM
    Code:
    Restarting nginx: nginx: [warn] conflicting server name "localhost" on 0.0.0.0:80, ignored
    nginx: [warn] conflicting server name "site.com" on 0.0.0.0:80, ignored
    nginx: [warn] conflicting server name "www.site.com" on 0.0.0.0:80, ignored
    nginx.
    i deleted the demodomain using the code above, after restart I received above error. Please advise why? Thanks
     
  4. eva2000

    eva2000 Administrator Staff Member

    28,942
    6,570
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,751
    Local Time:
    2:53 PM
    Nginx 1.13.x
    MariaDB 5.5
    use egrep recursive command to find all instances of localhost, site.com and www.site.com in your nginx vhost files directory at /usr/local/nginx/conf/conf.d/ excluding log files from output

    Code:
    egrep -R 'localhost|site.com|www.site.com' /usr/local/nginx/conf/conf.d/* | grep -v '.log'
    
    you should only have one entry returned for ssl.conf which has commented out with hash # in front of server_name localhost; line which you can ignore
    Code:
    egrep -R 'localhost|site.com|www.site.com' /usr/local/nginx/conf/conf.d/* | grep -v '.log'
    /usr/local/nginx/conf/conf.d/ssl.conf:#    server_name  localhost;
     
  5. quicksalad

    quicksalad Member

    159
    9
    18
    May 31, 2015
    Ratings:
    +13
    Local Time:
    10:23 AM
    here's my result:
    Code:
    /usr/local/nginx/conf/conf.d/site.com.conf:  server_name site.com www.site.com;
    /usr/local/nginx/conf/conf.d/virtual.conf:            server_name site.com www.site.com;
    please advise what to do..thanks
     
  6. eva2000

    eva2000 Administrator Staff Member

    28,942
    6,570
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,751
    Local Time:
    2:53 PM
    Nginx 1.13.x
    MariaDB 5.5
    there's your problem you have server_name set same in 2 nginx vhosts

    for /usr/local/nginx/conf/conf.d/virtual.conf it should have server_name set to server's main hostname not the site domain name i.e. when you order a vps the hostname maybe set or entered as host1.site.com, that is your server_name main host name put it /usr/local/nginx/conf/conf.d/virtual.conf

    site.com for /usr/local/nginx/conf/conf.d/site.com.conf is correct if that is created domain via centmin.sh menu option 2
     
    • Like Like x 1
  7. quicksalad

    quicksalad Member

    159
    9
    18
    May 31, 2015
    Ratings:
    +13
    Local Time:
    10:23 AM
    thanks i figure it out on this thread also Centminmod help | XenForo Community

    thanks for the clear explanation :)
     
    • Like Like x 1