Symptoms
When a new domain is added onto an account using the option "Choose a domain later", and the server's network is setup to be in a NAT, the newly created "AutoDomain" is incorrectly set to the public IP instead of the private IP. As a result, the domain is not accessible.
Description
We've opened an internal case for our development team to investigate this further. For reference, the case number is WPX-9106. Follow this article to receive an email notification when a solution is published in the product.
Workaround
These steps will need to be performed any time that a new "AutoDomain" domain is added onto the server.
1. Backup current userdata:
cp -a /var/cpanel/userdata{,-$(date +%s)}
2. Update all instances of the old IP to the new IP:
sed -i 's/PUBIP/PRIVIP/g' /var/cpanel/userdata/*/*.site
Where “PUBIP” is the Public IP, and “PRIVIP” is the Private IP.
a. If you are unsure of your current IP allocation, you can view this information via the following:
cat /var/cpanel/cpnat
3. Rebuild the userdata caches:
/scripts/updateuserdatacache && /scripts/updateuserdomains
4. Rebuild and restart NGINX:
/scripts/ea-nginx config --all
5. Rebuild and restart Apache:
/scripts/rebuildhttpdconf && /scripts/restartsrv_httpd