I recently installed a fresh copy of webwork following the instructions on
https://webwork.maa.org/wiki/Installation_Manual_for_2.16_on_Ubuntu
Option C in this file discusses installing a self-signed certificate for allowing SSL connections via https. These days, using self-signed certificates will still pop-up warnings on many web-browsers when accessing sites. There are instead many options for free externally signed certificates (mostly expiring in 90 days).
If you don't want to be bothered with reinstalling a certificate manually every 90 days, you can install certbot to handle this for you. I set up certbot for our installation following the instructions at
https://certbot.eff.org/lets-encrypt/ubuntufocal-apache
and was really impressed by how simple it was (you have to leave snapd installed however).
Benjamin Walter