OS.js over HTTPS/SSL


#1

I’m trying to put OS.js over SSL with LetsEncrypt. I changed my apache file to

<VirtualHost *:80>
  ServerName osjs.example.com

  SSLEngine On
  SSLCertificateFile /etc/letsencrypt/live/osjs.example.com/fullchain.pem
  SSLCertificateKeyFile /etc/letsencrypt/live/osjs.example.com/privkey.pem

  ProxyPass / https://localhost:8000/
</VirtualHost>

but Chrome gives an ERR_CERT_COMMON_NAME_INVALID. The detailed info shows the subject as the root domain example.com not osjs.example.com.

What do I do?


#2

You need to register a certificate on the exact domain or use a wildchar.

The easiest is just to use the Let’s Encrypts “certbot”.

If it is a private or local server you can just make your own certificates.