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 . .Every thing went fine
But when i tried to connect to https://localhost
I got as
Then I clicked Advance and proceeded ..Then I got a MOZILLA_PKIX_ERROR_SELF_SIGNED_CERT Error in Firefox
The picture is
Then i could view the page but connection seems to be insecure ...
How can i obtain a secure connection
I tried wget
The result is
--2021-05-11 05:21:37-- https://localhost/
Resolving localhost (localhost)... 127.0.0.1
Connecting to localhost (localhost)|127.0.0.1|:443... connected.
ERROR: cannot verify localhost's certificate, issued by ‘CN=localhost,OU=Development,O=Localhost CA,L=Rochester,ST=New York,C=US’:
Self-signed certificate encountered.
To connect to localhost insecurely, use `--no-check-certificate'.
I tried with postman still getting a signing key error...
How can i get rid of this signing key intermediate certificate error..
I refered the tutorial here ... The operating System I am using is ubuntu 20.04 and the server i am trying to implement it is nginx
How can i make a trusted https localhost connection..any Help will be appreciated