How can I configure SSL in my domain in a droplet with multi domains when I have one domain in use?

Hello DO community.

I am try configuring SSL for my domain ( this is a wordpress site and I am using Let’s Encrypt for that.

So, I am following this article to learn about this question:

My situation is that:

  1. I am using a single droplet on DigitalOcean for my personal sites;

  2. In this droplet, I have one site works right now and this site are using a Wordpress (Apache, PHP, etc);

  3. In the future (less them one month) I will install a new domain on this droplet;

I am reading this article to help me configure many domains in the same Apache, in the same droplet:

My question is:

If I create multi domains structure in my apache server, what can I do with de main domain ( The domain that are works now.

Can I use the backup to restore the site? Or can I move the files to the folder correspondent (Eg: var/www/html/georodrigues, var/www/html/secondsite etc) before I made changes In apache setting? The site will works or I need to change other configuration?

If the community can help me with some tutorial will be very nice.

Thanks :)

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

Hi there @georodrigues,

Indeed it is recommended to create separate virtual hosts for each website. In your case what you could do is to create a virtual host for your domain name as described here:—-setting-up-virtual-hosts-(recommended)

One thing that you need to keep in mind is that if you change your document root from /var/www/html to /var/www/georodrigues you might have to update any references that you have in your WordPress database as well from /var/www/html to /var/www/georodrigues.

If you would like to avoid doing this, then you could just create a separate virtual host for your domain name as described, but keep the document root set to /var/www/html, that way you would not have to update any references in your database.

Hope that this helps! Regards, Bobby