wget ERROR: cannot verify localhost's certificate, ..Self-signed certificate encountered

How Can I implement a secure https connection on ngnix

I want to implement https on my localhost.I am running http server nginx on ubuntu 20.04

What I did was i issued the command

sudo openssl req -x509 -nodes -days 3650 -newkey rsa:2048 -keyout /etc/ssl/private/localhost.key -out /etc/ssl/certs/localhost.crt -config /tmp/openssl

Then I configured nginx to use ssl as

 listen 443 ssl default_server; listen [::]:443 ssl default_server; ssl_certificate /etc/ssl/certs/localhost.crt; ssl_certificate_key /etc/ssl/private/localhost.key;

And Refreshed and reloaded nginix ...ok fine

certutil -d sql:$HOME/.pki/nssdb -A -t "P,," -n localhost.crt -i /etc/ssl/certs/localhost.crt

. .Every thing went fine

The tutorial i followed was from here

But when i tried to connect to

I got as

enter image description here

Then I clicked Advance and proceeded ..Then I got a MOZILLA_PKIX_ERROR_SELF_SIGNED_CERT Error in Firefox

enter image description here

But when opening in chrome the error is

enter image description here

when i tried on wget

enter image description here

When I tried on postman

enter image description here

Please help me on how to get a secure self signed trusted https connection on localost

3 Reset to default

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like