Hi What is the proper way to remove the default account demodomain.com created by Centminmod? Thanks
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
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
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;
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
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
thanks i figure it out on this thread also Centminmod help | XenForo Community thanks for the clear explanation