2đź‘Ť
I don’t know what setup others use, but I generally set up Django apps with Nginx serving static content and Gunicorn as the application server. It’s widely accepted that Django apps usually use this kind of two web server setup. The standard instructions for setting up Let’s Encrypt with Nginx worked fine for me.
Or Digital Ocean have an excellent guide too.
EDIT: It looks like Nginx can do a “graceful” reload that just updates the config with no downtime. For Debian or Ubuntu pre Systemd this would be sudo service nginx reload
, while for a distro with Systemd the command is sudo systemctl reload nginx.service
.
1đź‘Ť
In case other users come this way like I did from Google, here’s how I improved this situation:
I was unsatisfied by my options when it came to creating ACME
challenges for Let’s Encrypt when running a Django
application. So, I rolled my own solution and created a Django app! Basically, you can manage your ACME
challenges as just another object, and the app will produce the proper end-point URL.
Yes you are installing an app which means a deploy / update to your app, but once you’ve done that managing your challenges is far easier in the long run.
Simply pip install django-letsencrypt
and follow the README
to be on your way.
- [Django]-Django.admin.SimpleListFilter.queryset – return list?
- [Django]-Django Channels 2.0 channel_layers not communicating
- [Django]-Django admin url filter won't work
- [Django]-Tensorflow: Module must be applied in the graph it was instantiated for
- [Django]-Passing context variable in generic.UpdateView