Create SSL certificate for use of https on localhost

1

I've tried some tutorials on the internet to enable https in my localhost and so far I have not been able to do it right, something seems broken because it appears as a non-secure page and the "https: //" but if I force it it works; The terminal is also asking for a password at all times that I imagine to be the certificate. What I wanted to do is redo everything again, clean what I did before and learn the step by step, if anyone can help me, I'm grateful.

I'm using linux / ubuntu16.10

    
asked by anonymous 15.12.2016 / 13:12

1 answer

1

Apparently you're not doing anything wrong. The failure that indicates that the page is not secure appears because the certificate is self-signed (created by you). Read here a clarification on this. As you can see, it is possible to tell Firefox that the certificate, although self-signed, is reliable. But the always message will appear unless you purchase a certificate signed by a trusted certifying institution ( more details ).

In short, to use a self-created certificate, you will always have to "force" the browser to trust it.

To generate certificate without the password (assuming you use openssl ), just pass -nodes option on the creation command, something like this: openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout local_da_key/nome.key -out local_do_certificado/nome.crt

This information came from here , and in free translation, it's more or less this:

  

-nodes: This option informs OpenSSL that we do not want to protect our key file with a password. Having a password protected key file would hinder Apache's automatic startup, as we would have to enter the password every time the service was restarted.

I think the step-by-step tutorial I've listed is really good for learning the basics.

If you have a public domain registered to either free certification, it is worth knowing link , which together with link are an excellent tool (See a tutorial for Apache here / a>).

    
15.12.2016 / 14:36