Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add optional certbot renewal routes.
To enable these routes set `enable_certbot_renewal_routs: 1` in conf/webwork2.mojolicious.yml. Also make sure that `http://*:80` is in the hypnotoad `listen` list in addition to `https://*:443?...`. Then execute ``` sudo certbot certonly --webroot -w /opt/webwork/webwork2/tmp \ -d your.domain.edu \ --post-hook "chown -R www-data:www-data /etc/letsencrypt && systemctl reload webwork2" ``` to renew certificates without needing to stop the webwork2 app. That command will renew the certificate for the first time, and also set up autorenewal in the future. Obviously your.domain.edu needs to be changed to your actual domain name. Note that /opt/webwork/webwork2/tmp is the default value of $webworkDirs{tmp}. If you customize $webworkDirs{tmp} in localOverrides.conf, then you will need to use what you have that variable set to instead. Be careful since the default value of $webworkDirs{tmp} depends on the value of $webworkDirs{root} (which is /opt/webwork/webwork2 by default). So if you customize $webworkDirs{root}, then you will need to adjust the path accordingly. Also, change www-data:www-data in the command to be server_user:server_group where server_user and server_group are the values of those settings above. The post hook in the command will run every time that certificates are automatically renewed, and will fix permissions on the new certificates so that the webwork2 app can read them, and will hot reload the webwork2 app to load the new certificates (with zero downtime).
- Loading branch information