Bobcares

The domain already exists in the Apache configuration : Causes and Fix

by | Oct 17, 2018

Billing automation tools like “WHMCS” help Web Hosts to create and edit accounts in a jiffy.

But things like high server load, database connection errors etc. can cause WHMCS to fail which results in partial creation or removal of domains.

And such partial entries on the server can cause domain recreation to fail with the error :

“The domain “abc.com” already exists in the Apache configuration.”

As part of our Support Services, we often see this error when customers try to migrate domains, or change domain as main account etc.

Today let us discuss 3 scenarios where this error pops up and how we fix them.

 

What causes the error “The domain already exists in the apache configuration.”?

On new domain creation, cPanel first checks if the domain name is already present in any of the server configuration files.

And if a match is found, it aborts domain creation with the error “The domain already exists in the apache configuration.”

We’ll now see the common reasons for cPanel to show “Domain already exists” error.

 

1. Addon Domain Creation

Addon domain creation or deletion from cPanel works correctly in most cases.

But when there are server issues like bad disk, high load etc., domain deletion process can get stuck half-way.  And then, addon domain entries are not properly removed from the server files.

When a customer tries to add the same domain again, it will result in the error shown in the image below:

 

 

But the domain never shows up under Addon Domains in cPanel.

The same error can happen even with domain migration or backup-restore as well.

 

2. Add new domain that matches server hostname

By default, cPanel adds an entry for server name in the Apache configuration file.

Some VPS server owners set the server name as their domain name itself. In such servers, when customers try to create a domain that matches server name, it shows the error “Domain already exists in the Apache configuration”.

It is important to ensure that server name is set as something like server.xyz.com and not xyz.com. Then there will not be any issues while creating new domain xyz.com.

 

3. WHMCS Module Command error

WHMCS can malfunction when there are connectivity issues with server and this causes tasks to fail.

Due to such issues, if a webhosting provider re-submits the ‘create account’ button,  it results in the error :

Module Command Error:

The domain “xyz.com” already exists in the Apache configuration.

 

How to fix “Domain already exists in the apache configuration”

Although there are many situations where this error pops up, the fix is to correct the duplicate entries for the domain.

Our Support Engineers check the server and remove entries for conflicting domain in Apache configuration file, httpd.conf. Then we rebuild Apache on the server.

But we’ve seen situations where error still exists due to domain entries present in cPanel user data files.

In such cases, we remove the user related files from /var/cpanel/userdata/ and clear user related cache. That fixes the error and domain creation works fine.

Conclusion

The presence of duplicate records for the domain in the Web server files results in account creation errors. We’ve discussed couple of scenario where server complains “Domain already exists” and how our Support Engineers fix them.

 

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

SEE SERVER ADMIN PLANS

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie
_clck, _clsk, CLID, ANONCHK, MR, MUID, SM

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

_reb2bgeo - The visitor's geographical location

_reb2bloaded - Whether or not the script loaded for the visitor

_reb2bref - The referring URL for the visit

_reb2bsessionID - The visitor's RB2B session ID

_reb2buid - The visitor's RB2B user ID

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid
_reb2bgeo, _reb2bloaded, _reb2bref, _reb2bsessionID, _reb2buid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF