I am trying to convert http to https (secure) inside nginx, for that purpose I created and add self signed certificate inside nginx conf file.
server {
listen 80;
server_name www.local.com;
rewrite ^ https://$server_name$request_uri? permanent;
}
server {
listen 443;
server_name www.local.com;
ssl on;
ssl_certificate /etc/ssl/self_signed_certificate.crt;
ssl_certificate_key /etc/ssl/self_signed_certificate.key;
}
Now, When I give url, it redirects from http to https. and show me messeage in crome "The site security certificate is not Trusted.! ". When I clicked on Proceed anyway. I got "SSL Connection" Error. Its working perfectly on http. How to run my local website using https.
I am using uwsgi server and website is in python - Django. What mistake I did or something else I have to do ? Please Help. Thanks in advance (Sorry for my english).
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…