$ sudo dnf install nginx
$ sudo ln -s /path/to/Wedding/root/www.stephandwill.com.conf /etc/nginx/conf.d/www.stephandwill.com.conf
# Install SELinux module to grant nginx permissions to write to sockets
$ sudo semodule -i nginx.pp
$ sudo dnf install certbot
$ sudo pip install certbot-nginx
$ sudo certbot --nginx -d stephandwill.com -d www.stephandwill.com -d willandsteph.com -d www.willandsteph.com
Add 0 12 * * * /usr/bin/certbot renew --quiet
within sudo crontab -e
https://www.nginx.com/blog/using-free-ssltls-certificates-from-lets-encrypt-with-nginx/
$ source /path/to/Wedding/root/../py-venvs/Wedding/bin/activate
$ pip install -r /path/to/Wedding/root/requirements.txt
$ sudo echo "d /run/gunicorn-wedding 0755 <someuser> <somegroup> -" > /etc/tmpfiles.d/gunicorn-wedding.conf
$ sudo systemd-tmpfiles create
The above may be needed https://developers.redhat.com/blog/2016/09/20/managing-temporary-files-with-systemd-tmpfiles-on-rhel7/
$ sudo systemctl enable /path/to/Wedding/root/gunicorn-wedding.socket
$ sudo systemctl enable /path/to/Wedding/root/gunicorn-wedding.service
$ sudo systemctl start gunicorn-wedding.socket
sudo tail -F /var/log/audit/audit.log
How to create a module to allow permissions comes from http://nts.strzibny.name/allowing-nginx-to-use-a-pumaunicorn-unix-socket-with-selinux/
$ sudo grep nginx /var/log/audit/audit.log | audit2allow -m nginx > nginx.te
$ checkmodule -M -m -o nginx.mod nginx.te
$ semodule_package -o nginx.pp -m nginx.mod
$ sudo semodule -i nginx.pp
$ systemctl status gunicorn-wedding.socket
$ systemctl status gunicorn-wedding.service
$ sudo systemctl daemon-reload && sudo rm /run/gunicorn-wedding/socket && sudo systemctl stop gunicorn-wedding.socket && sudo systemctl stop gunicorn-wedding.service && sudo systemctl stop nginx && sudo systemctl start gunicorn-wedding.socket && sudo systemctl start gunicorn-wedding.service && sudo systemctl start nginx
$ sudo tail -F /var/log/nginx/wedding-error.log
$ sudo nginx -t
Test nginx configurations
$ sudo systemctl reload nginx