Tutorial: How to install a custom SSL certificate on WordOps

Tutorial: How to install a custom SSL certificate on WordOps

WordOps is a free alternative to Cloudways to deploy and manage an optimized WordPress stack with nginx on your own VPS in the cloud. Although the product is promising, it is unfortunately not yet fully mature. Besides some smaller issues, it also lacks documentation for more specific solutions.

While you’ll often find questions regarding these topics in the community forum, there’s often no helpful answers. I noticed some of the most active forum members often act like trolls, posting answers such as „Just do a Google search“ or „That’s why system administrators exist“.

How to install a custom third-party SSL certificate on WordOps is such a topic. While you can easily find plenty of tutorials and howto’s on how to install a SSL cert on nginx, these guides don’t take into account some specifics of the WordOps stack. Here’s an update-proof way to add a 3rd party SSL certificate to WordOps:

1. Copy your signed certificate, the CA certificate bundle (which contains the root and intermediate certificates) and the private key to /etc/ssl/yoursite.com/ and change into the directory. Obviously replace yoursite.com with your WordOps site.

cd /etc/ssl/yoursite.com/

2. Combine the signed cert and the CA bundle:

cat 234567890.crt 234567890.ca-bundle >> yoursite.crt

3. Create the file /var/www/yoursite.com/conf/nginx/ssl.conf and add the following lines:

listen 443 ssl http2;
listen [::]:443 ssl http2;
ssl on;
ssl_certificate        /etc/ssl/yoursite.com/yoursite.crt;
ssl_certificate_key    /etc/ssl/yoursite.com/private.key;

4. In order to properly redirect http traffic to https, create the file /etc/nginx/conf.d/force-ssl-yoursite.com.conf and add the following lines:

server {
    listen 80;
    server_name yoursite.com www.yoursite.com;
    return 301 https://www.yoursite.com$request_uri;
}

5. Apply the new configuration to nginx and you’re done:

service nginx reload

I hope this helps.


2 Replies to “Tutorial: How to install a custom SSL certificate on WordOps”

  1. Thanks man, you just saved my day! It’s a shame how to configure a custom 3rd party ssl certificate isn’t covered in the docs nor the forum.

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.