How do I install TLS on my droplet if I have Serverpilot?

Hi, apologies in advance for my general lack of knowledge about this stuff.

I have a Wordpress blog on a DigitalOcean droplet. I installed Serverpilot with this guide:

Then I installed WP by following this one:

So that’s worked all fine. It’s just a personal blog site so I don’t need anything crazy.

However, now I’d like to add a TLS/SSL certificate to my site. I found this guide from DO:

But, when I went to start it, I realized that my droplet doesn’t actually have the apache package! I think because of having Serverpilot, if I do dpkg -l | grep apache, it just returns “apache-sp”, which is ServerPilot’s version.

So I’m guessing following that DO TLS guide won’t work, right? For example, I don’t even have a /var/www directory (like you would if you have legit normal apache).

To be honest I don’t really understand why I even have Serverpilot. I just want Wordpress, which it seems like you can install without using SP, right? It seems like to get TLS working with Serverpilot, I might have to pay? Whereas it would be free if I just followed the DO guide, right?

thanks for any tips or advice!

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hi @DOdood ,

Well I would say you follow the tutorial and see if the certbot can actually use the apache version of serverpilot. If this doesn’t work, you could always install the certificate manually.

To install a Let’s Encrypt certificate manually, you can run the following:

sudo /path/to/certbot-auto certonly --webroot -w /var/www/example -d -d

This will create a certificate manually hopefully. If this doesn’t work, stop your apache service and run the standalone webserver cerbot offers:

sudo /path/to/certbot-auto certonly --standalone -d -d

Once done, it will tell you something like:

Congratulations! Your certificate and chain have been saved at:
Your key file has been saved at:
Your cert will expire on 2019-09-23. To obtain a new or tweaked
version of this certificate in the future, simply run certbot
again. To non-interactively renew all of your certificates, run
“certbot renew”

With this certificate, you need to edit your apache vhost and add them in there:

<VirtualHost *:443>
    DocumentRoot /var/www/example
    ErrorLog /var/www/example/error.log
    CustomLog /var/www/example/requests.log combined
    SSLEngine on
    SSLCertificateFile /etc/letsencrypt/live/
    SSLCertificateKeyFile /etc/letsencrypt/live/

And then restart apache again!

Hope this makes sense. If you need any more assitance please post some output, logs etc. Trial- and-Error my friend :D