Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

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:
    51
    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 Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,822
    Likes Received:
    1,898
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,608
    Likes Received:
    32
    Trophy Points:
    238
    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
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice