Question

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).

Was it helpful?

Solution

You are getting the message because you are using a self signed certificate, you need to use a SSL certificate from a trusted provider to avoid the warning. You can get a free SSL cert that is trusted by most major browsers at StartSSL. You can see all of the browsers that are supported here.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top