Question

We would like to do the website clone and move it on a subdomain

Posted March 29, 2020 219 views
Joomla

Please also let us know which hosting panel services our website (for example, cPanel or similar)? Or how we could find this info.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer

Hi @careWalrus,

I’m not entirely sure I understand your question however will try to answer to the best of my abilities, please do let me know if I missed something out.

Let’s start from the beginning, do you have a Droplet with DigitalOcean or do you wish to move here. If you don’t have a Droplet, you’ll need to create one and have your website migrated either by your end or find someone to do it for you. If you have a Droplet and just want to copy the website from one folder to another and have it load from different places - domain’s, subdomains, that’s also possible.

Let’s start with creating a new Droplet. You can use cPanel for your droplet if you are familiar with it. Luckily, DigitalOcean have a OneClick App for cPanel - https://marketplace.digitalocean.com/apps/cpanel-whm . This will install cPanel for you and you’ll just need to copy/migrate the website over to it.

Let’s continue with the option where you have a Droplet and want to duplicate the website. In this case, first you need to figure out which WebService are you using Nginx or Apache. To do so, you’ll need to SSH to your droplet:

ssh root@YourDropletIp

and type in the following command

netstat -tulpen | grep 80

Based on the result you’ll see if it’s either Nginx or Apache.

Now that you know which server it is, you can follow these tutorials to see how to create a new configuration file for the new subdomain

Apache :

https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-18-04

Nginx :

https://www.digitalocean.com/community/tutorials/how-to-set-up-nginx-server-blocks-virtual-hosts-on-ubuntu-16-04

Now that you’ve configured what you need, copy the files from the main website’s folder to the one you’ve just created. You can use the cp command to do so.

Be sure to create a new MySQL and dump the database there as well.

Lastly, make sure to create a DNS record for your subdomain. Depending on where you nameservers are/where your DNS is being managed, you’ll need to add an A record for your just created subdomain.

Regards,
KDSys

by Justin Ellingwood
When using the Nginx web server, server blocks (similar to the virtual hosts in Apache) can be used to encapsulate configuration details and host more than one domain off of a single server. In this guide, we'll discuss how to configure server blocks in Nginx on an Ubuntu...
Submit an Answer