The domain already exists in the Apache configuration

Jasmine Demir

Registered
Jul 29, 2018
4
0
1
San Antonio, TX
cPanel Access Level
Reseller Owner
I'm starting a digital marketing and wordpress web design company.
I've started my first reseller account. I'm setting up multiple sites for myself right now, maybe hosting for clients eventually.

Twice some data from a domain name processed on a hosting/domain order, but the hosting portion didn't complete. I fixed the error with the hosting package ( something not matching between WHM and WHMCS). The domain name wasn't officially purchased - the order never went to the registrar (Enom.)

However, when I go to complete the same order again I get the "XID vqje7z) The domain already exists in the Apache configuration." error mentioned in the title.

Pretty much immediately I realized I need to delete or move a file. 10 hours later I'm wondering why this is so difficult, and why I can't do this through cPanel.

I've found these types of solutions over and over that rely on SSH and command line terminal skills that I don't possess:
My biggest issue with those solutions is they start about 10 steps from where I am. Sure I'm able to type those scripts on a keyboard, but where, how, why ? I downloaded Ubuntu, tried to connect Putty and get started with command line stuff based on a couple tutorials, but I have no idea if I've done any of that correctly, and it still feels like I'm a long way from the baseline knowledge and setup to solve my problem.

Is there a solution that doesn't involve SSH and using commandline ?- I only have a few accounts, and I wouldn't mind terribly losing the data as long as I can keep my domain names without issue.

If not, can someone help me with a solution from complete novice to where those above threads begin?

This seems like it should be one of the easier issues to fix. Just need to delete a file somewhere. Do you think I'm going to continue to have trouble without these skills?

Thanks in advance for any help or advice.


 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,304
363
Houston
Hi @Jasmine Demir


If there are remnants of an account that was attempted to be added on the server remaining they'll need to be removed before you can move forward, your profile indicates you're a Reseller Owner and while it seems you have access to SSH do you have root access to the server? If you, you can run:

Code:
grep $domain /var/cpanel/userdata/*/*
Which will output all the references to the domain name in userdata. Once you're sure they're removed you should be able to run:

Code:
/scripts/updateuserdatacache
and then
Code:
/scripts/rebuildhttpdconf && /scripts/restartsrv_httpd
Then you should be able to re-add the domain.

Thanks!
 
  • Like
Reactions: urgido

Jasmine Demir

Registered
Jul 29, 2018
4
0
1
San Antonio, TX
cPanel Access Level
Reseller Owner
Thanks for your reply. I'm sorry I am at a very very basic level of understanding.I've tried to do the things tutorials say I need for SSH access, but nothing seems to be connecting as it should. I'm not close to being able to act on your instructions. I don't even know the answer to your question about root access. I'll research that now.

As I'm running into major roadblocks early and often, I'm worried that issues will continue to require SSH proficiency for resolution. If it's just a matter of SSH being more efficient than other solutions, that's not too important for me right now. I won't be managing many accounts at first just my own. It would be less efficient for me to drop everything else to build up my SSH knowledge just to fix 1 thing at this point.

I know my original request wasn't short, but I have 2 main questions :

  1. Is there a way to do this without SSH terminal commands - As in just using the cPanel GUI?
  2. Will SSH skills fundamentally urgent to managing a couple of my own accounts for now, to the point where I shouldn't move forward before demonstrating working knowledge of SSH?
Thanks,
Jasmine
 

Jasmine Demir

Registered
Jul 29, 2018
4
0
1
San Antonio, TX
cPanel Access Level
Reseller Owner
Also, in your code, are those values exactly what I should type in?

Assume I don't know anything about coding, i.e. please don't assume that I understand that something in your syntax is a universal variable that I need to replace with my specific relative variable.

Thanks again!
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,304
363
Houston
Is there a way to do this without SSH terminal commands - As in just using the cPanel GUI?
To fix the broken account there is not a way to do this through the UI that I'm aware of. As I show you being a Reseller Owner, Your hosting provider should be able to assist you with this if you're unsure how to complete the actions.

  1. Will SSH skills fundamentally urgent to managing a couple of my own accounts for now, to the point where I shouldn't move forward before demonstrating working knowledge of SSH?
Typically knowledge of the CLI is not necessary though it doesn't hurt to know your way around in the event of an issue such as the one you've encountered occurring.

Assume I don't know anything about coding, i.e. please don't assume that I understand that something in your syntax is a universal variable that I need to replace with my specific relative variable.
The only command I provided that will need to be modified is the first one. $domain should be changed your domain name
 

Jasmine Demir

Registered
Jul 29, 2018
4
0
1
San Antonio, TX
cPanel Access Level
Reseller Owner
Issue keeps occuring. Diving into learning CLI and SSH connections. Hope to work forward to the point where I understand where to apply your code solution:

Code:
grep $domain /var/cpanel/userdata/*/*
It might save time for this solution to try to work backward from the start of your solution too. I'll try to start asking more succinct questions.

I'm using Ubuntu terminal on Windows. Still unsure if I have working access to my server.
Currently my command line starts at

Code:
jdem@DESKTOP-KV3IT5J:~$
Are we assuming your code solutions are typed in following that?

Thank you for your help!
 
Last edited:

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,304
363
Houston
Hi @Jasmine Demir

Maybe a different approach may be more helpful too! What version of cPanel are you running? You can find this in WHM at the top right of the screen. If you're running v72 or higher of cPanel you can access the terminal directly from WHM.

Go to WHM>>Server Configuration>>Terminal

Once the command line UI is displayed all you need to do is enter in those three commands as I explained before.

The first one is the only one you need to make a modification to make sure you hit enter and paste any output you get from any of these in your response to us.

1.
Code:
grep $domain /var/cpanel/userdata/*/*
2.
Code:
/scripts/updateuserdatacache
3.
Code:
/scripts/rebuildhttpdconf && /scripts/restartsrv_httpd


Information on terminal from within WHM can be found here: Terminal in WHM - Version 72 Documentation - cPanel Documentation

If you don't have the terminal available from within WHM we do have a tutorial on connecting to your server via SSH here: SSH Access - Version 72 Documentation - cPanel Documentation
 

Jans

Registered
May 12, 2020
4
1
3
Lusaka,Zambia
cPanel Access Level
Reseller Owner
Am trying to re-add a domain via WHM but am getting the response to say "(XID 4ry42g) The domain michaenbase.com.zm already exists in the userdata cpanel.net"

I have deleted the domain under zones as well as removing the account but still getting same response.Further,also rebooted my server which has yielded nothing.Now not sure what to do now
 

Jans

Registered
May 12, 2020
4
1
3
Lusaka,Zambia
cPanel Access Level
Reseller Owner
@Jans

Can you also confirm you followed the instructions noted in the OP's linked threads on how to parse userdata for information on the user?
@Jans

Can you also confirm you followed the instructions noted in the OP's linked threads on how to parse userdata for information on the user?

hello i managed too resolve it after purging some data in the database cause thats where some userdata was still existing.Thanks for your response
 
  • Like
Reactions: cPanelLauren