Answer the question
In order to leave comments, you need to log in
How to set up https for Django + nginx?
I found the tutorial "Django - Lesson 019. Setting up the HTTPS protocol on the site from Let`s Encrypt" https://evileg.com/en/post/220/ and started trying. The bummer came out on receipt of the certificate, it gives an error:
To fix these errors, please make sure that your domain name was
entered correctly and the DNS A/AAAA record(s) for that domain
contain(s) the right IP address.
Answer the question
In order to leave comments, you need to log in
Here is my nginx file with some revisions that got the certificate
server {
listen 80;
server_name example.com www.example.com;
location = /favicon.ico { access_log off; log_not_found off; }
location /static/ {
root /home/user/example;
}
location /.well-known {
alias /var/www/example/.well-known;
}
location / {
include proxy_params;
proxy_pass http://unix:/run/gunicorn.sock;
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question