Again, there is no existing account, and we already ran through all of those files and determined that the domain is in the Apache configuration because the hostname is the name of the server and the installation process for the server requires a hostname be assigned, which is why the network.tld domain was used because all of our servers/routers use that domain.
You are able to use a subdomain of a domain as the hostname though, this is what I've been trying to explain. The only caveat is that subdomain which is used as the hostname cannot be used for anything else, the root domain can be used though. So I can have my hostname as server.cptest.com and an account on my server for cptest.com which does not cause conflict. Something else is happening here there's something else causing the conflict to occur I don't believe it's the hostname. Otherwise, no one would be able to create a server with one domain, they'd need to own two which is not the standard.
Here's what we found, which was expected:
/etc/localdomains:cp1.network.tld
/etc/remotedomains:network.tld
/etc/remotedomains:list.network.tld <=== No idea why this is in here as that's another server entirely.
/etc/ssldomains:network.tld: 123.123.123.123
/etc/ssldomains:cp1.network.tld: 123.123.123.123
I tested this thoroughly on my server using the domain cptest.com, I added it into /etc/remotedomains, /etc/ssldomains and then rebuilt the apache configuration then tried to create the account cptest.com, which completed successfully. There is no purpose for the domain network.tld to be listed in /etc/ssldomains and /etc/remotedomains. All this does is further enforce that the root domain is referenced within and acccount or in the configuration on the server somewhere.
So, do we remove those entries? Sounds a bit sketchy. Do we use WHM > Networking Setup > Change Hostname? Instructions clearly state, "It is important to choose a hostname that you will not be using for any account."
A hostname that will not be used for any account, meaning the subdomain.domain.tld this does not mean domain.tld can't be used.
When you do add the domain, if you want to add other subdomains of it you'll need to have this set to on or WHM will deny them as well.
Here is my test using the domain test.com:
We can clearly see it exists in the apache configuration as well as other configurations in /etc/ including /etc/localdomains:
Code:
# grep -r test.com /etc/
/etc/hosts:172.16.0.122 v70.test.com v70
/etc/sysconfig/network:HOSTNAME=v70.test.com
/etc/sysconfig/network:DOMAINNAME=test.com
/etc/hostname:v70.test.com
/etc/apache2/conf/httpd.conf:ServerName v70.test.com
/etc/apache2/conf/httpd.conf: ServerAlias v70.test.com
/etc/apache2/conf/httpd.conf: ServerName v70.test.com
/etc/apache2/conf/httpd.conf: RewriteCond %{HTTP_HOST} !^v70.test.com$
/etc/apache2/conf/httpd.conf: RewriteCond %{HTTP_HOST} !^v70.test.com$
/etc/apache2/conf/httpd.conf: RewriteCond %{HTTP_HOST} !^v70.test.com$
/etc/apache2/conf/httpd.conf: RewriteCond %{HTTP_HOST} !^v70.test.com$
/etc/apache2/conf/httpd.conf: RewriteCond %{HTTP_HOST} !^v70.test.com$
/etc/apache2/conf/httpd.conf: RewriteCond %{HTTP_HOST} !^v70.test.com$
/etc/apache2/conf/httpd.conf: RewriteCond %{HTTP_HOST} !^v70.test.com$
/etc/apache2/conf/httpd.conf: RewriteCond %{HTTP_HOST} !^v70.test.com$
/etc/apache2/conf/httpd.conf: RewriteCond %{HTTP_HOST} !^v70.test.com$
/etc/apache2/conf/httpd.conf: RewriteCond %{HTTP_HOST} !^v70.test.com$
/etc/apache2/conf/httpd.conf: RewriteCond %{HTTP_HOST} !^v70.test.com$
/etc/apache2/conf/httpd.conf: RewriteCond %{HTTP_HOST} !^v70.test.com$
/etc/apache2/conf/httpd.conf: ServerName v70.test.com
Removed other domain references in datastore
/etc/dovecot/sni.conf:local_name "v70.test.com" {
/etc/wwwacct.conf:NS ns1.v70.test.com
/etc/wwwacct.conf:NS2 ns2.v70.test.com
/etc/wwwacct.conf:HOST v70.test.com
/etc/localdomains:v70.test.com
removed wwwacct.conf entries
Check Userdata:
Code:
[root@v70 ~]# grep -r test.com /var/cpanel/users/
[root@v70 ~]#
[root@v70 ~]# grep -r test.com /var/cpanel/userdata/
/var/cpanel/userdata/nobody/main:main_domain: v70.test.com
/var/cpanel/userdata/nobody/main.cache:{"addon_domains":{},"sub_domains":[],"main_domain":"v70.test.com","parked_domains":[]}
Looking for apache includes:
Code:
[root@v70 ~]# grep -r test.com /etc/apache2/conf.d/
[root@v70 ~]#
Now Because I don't have an SSL on my hostname (because it doesn't resolve to a real IP) I'll manually add it into /etc/ssldomains:
Code:
[root@v70 ~]# cat /etc/ssldomains
v70.test.com: 123.45.67.89
I've also added a subdomain to /etc/remotedomains:
Code:
[root@v70 ~]# cat /etc/remotedomains
test.test.com
I've also added the domain test.com to /etc/ssldomains and /etc/remotedomains
Code:
[root@v70 ~]# cat /etc/remotedomains
test.test.com
test.com
[root@v70 ~]# cat /etc/ssldomains
v70.test.com: 172.16.0.122
test.com: 172.16.0.122
So to summarize so far:
1. We have the hostname setup to be v70.test.com
2. We have the hostname present in the Apache Configuration, /etc/localdomains, /etc/ssldomains
3. We have the test.com domain added to /etc/remotedomains /etc/ssldomains but not present anywhere else on the server.
Now I create the account:
Code:
# /scripts/createacct test.com cptest <PASSWORD>
+===================================+
| New Account Info |
+===================================+
| Domain: test.com
| UserName: cptest
| PassWord: <PASSWORD>
+===================================+
This ok? y
Checking input data...Validating Username......Done
Validating IP......Done
Validating Contact Email......Done
...Done
Validating system setup......Done
Checking for database conflicts......Done
WWWAcct 12.6.0 (c) 2018 cPanel, Inc.......Done
Running pre creation script (/usr/local/cpanel/scripts/prewwwacct)......Done
Adding User......Done
Adding Entries to userdata......Done
Setting up Mail & Local Domains......Done
Configuring DNS......Done
Verifying MX Records and Setting up Databases......Done
Setting up Proxy Subdomains......Done
Updating Authentication Databases......Done
Adding Entries to httpd.conf......Done
Setting passwords......Done
Updating the userdata cache......Done
Setting up Horde database in the background.......Done
Creating bandwidth datastore......Done
Updating the dedicated IP address usage cache......Done
Generating and installing DKIM keys......Done
Enabling Apache SpamAssassin™......Done
Sending Account Information......Done
Running post creation scripts (/usr/local/cpanel/scripts/legacypostwwwacct, /usr/local/cpanel/scripts/postwwwacct, /usr/local/cpanel/scripts/postwwwacctuser)......Done
Setting up Domain Pointers......Done
Setting Reseller Privs......Done
Account Creation Complete!!!......Done
Account Creation Ok
Dns Zone check is enabled.
+===================================+
| New Account Info |
+===================================+
| Domain: test.com
| Ip: 10.18.17.250 (n)
| HasCgi: y
| UserName: cptest
| PassWord: <PASSWORD>
| CpanelMod: paper_lantern
| HomeRoot: /home
| Quota: 0 bytes
| NameServer1: ns1.v70.test.com
| NameServer2: ns2.v70.test.com
| NameServer3:
| NameServer4:
| Contact Email:
| Package: default
| Feature List: default
| Language: en
+===================================+
Custom Account Data Provided: no
Adding Shell Access (y)
Successlocaldomains...valiases ...vdomainaliases ...vfilters ...Bind reconfiguring on v70 using rndc
Zone test.com has been successfully added
Reconfiguring Mail Routing:
LOCAL MAIL EXCHANGER: This server will serve as a primary mail exchanger for test.com's mail.:
This configuration has been manually selected.
Bind reloading on v70 using rndc zone: [test.com]
wwwacct creation finished
Account Creation Ok
As we can see that was completed successfully with the hostname of the server being v70.test.com which I hope shows you that the issue must be something other than the hostname. The network.tld domain must be referenced on the server somewhere else.
So references to just network.tld are what need to be removed, the references to the subdomain (hostname) don't.
I know you have the hostname DNS zone present in /var/named are there any references to just network.tld? Please also check /etc/apache2/conf.d/includes