The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

virtual host / httpd.conf issue

Discussion in 'General Discussion' started by nwh, Nov 21, 2011.

  1. nwh

    nwh Registered

    Joined:
    Nov 21, 2011
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hello,

    I am getting: Sorry, that domain is already setup (remove it from httpd.conf). This account has been already removed from the server, but virtual host exists. How to safely remove virtual host for this domain, since you don't recommend direct editing of httpd.conf?

    Thanks for your reply!
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    653
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    Terminating the account should have removed any VirtualHost entries for the domain names added to that account. You may want to check if the same domain name is added to another account. The following commands should be useful for this:

    Code:
    /scripts/whoowns domain.com
    Code:
    grep domain.com /var/cpanel/users/*
    You can also view the VirtualHost entry in the httpd.conf file to see which username it's associated with.

    Thank you.
     
  3. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    If the domain doesn't end up existing in /var/cpanel/users/* location with any user, you may well need to go to /var/cpanel/userdata and do a grep for it:

    Code:
    cd /var/cpanel/userdata
    grep -R domain.com ./*
    After you find out what file or files that domain is in, you should remove the domain from that file after creating a backup of the file. Also, if a domain.com file exists for that domain, move that file elsewhere such as to /root

    After any files have been modified to no longer include the domain, then copy httpd.conf, rebuild it and restart it and try again to add the domain:

    Code:
    cp /usr/local/apache/conf/httpd.conf /usr/local/apache/conf/httpd.conf.111122
    /scripts/rebuildhttpdconf
    /etc/init.d/httpd restart
     
Loading...

Share This Page