This tutorial is for host admins who want to change subdomain or domain of website without actually recreating a website on CyberPanel or change subdomain or domain of an existing website. Why?
Because this cannot be done automatically on CyberPanel but there is a longer process that if not done correctly can mess up your virtual host configuration.
Before you start remove SSL certificate for subdomain.maindomain.com and remove any mailboxes for that subdomain.
Create the path
Under General card click edit
- Document root will not be created by the server automatically if it does not already exist. Please ensure that both the directory exists and it is owned by the correct user.
- Change the Virtual Host Name with subdomain1.maindomain.com from Step 1
This will change the virtual host file and you will require you to add entries for:
On Base tab change the Document Root with path from Step 1
On General tab fill in General and Index Files cards
Confirm there is NO paired SSL private key and SSL certificate for SSL listener
- By now you see “Configuration has been modified. To apply changes, please perform a graceful restart.” message. Perform a graceful restart
6.Reboot the server
- Go to
https://SERVER_URL:8090/phpmyadmin/index.php?route=/sql&db=cyberpanel&table=websiteFunctions_websites&pos=0this opens a table in PhpMyAdmin
On that table websiteFunctions_websites look for the line
site.site.com and change to
- Go back to list of websites - viola! You can see subdomain1.maindomain.com and now you can Issue SSL etc