By DOdood
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: https://serverpilot.io/docs/how-to-connect-a-server-to-serverpilot
Then I installed WP by following this one: https://serverpilot.io/docs/how-to-install-wordpress-on-digitalocean
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: https://www.digitalocean.com/community/tutorials/how-to-secure-apache-with-let-s-encrypt-on-ubuntu-16-04
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!
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!
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 example.com -d www.example.com
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 example.com -d www.example.com
Once done, it will tell you something like:
Congratulations! Your certificate and chain have been saved at:
/etc/letsencrypt/live/www.example.com/fullchain.pem
Your key file has been saved at:
/etc/letsencrypt/live/www.example.com/privkey.pem
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>
ServerName www.example.com
ServerAlias example.com
DocumentRoot /var/www/example
ErrorLog /var/www/example/error.log
CustomLog /var/www/example/requests.log combined
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/www.example.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/www.example.com/privkey.pem
</VirtualHost>
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
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.