Created
August 8, 2017 14:38
-
-
Save alexishida/6c4a3dfefe50b713a9933dec855e2f1b to your computer and use it in GitHub Desktop.
Gerando certificado https auto-assinado
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Gerando certificados para SSL Self Signed | |
| openssl req \ | |
| -newkey rsa:4096 -nodes -sha256 -keyout domain.key \ | |
| -x509 -days 3650 -out domain.crt | |
| # Gerando CSR | |
| openssl req \ | |
| -key domain.key \ | |
| -new -out domain.csr | |
| # Transformando CRT em PEM | |
| openssl x509 -in domain.crt -out domain.pem -outform PEM | |
| # Usando no nginx | |
| server { | |
| listen 443; | |
| server_name domain.com; | |
| # SSL | |
| ssl on; | |
| ssl_certificate /etc/nginx/certs/domain.crt; | |
| ssl_certificate_key /etc/nginx/certs/domain.key; | |
| # Links para Ajuda | |
| https://www.digitalocean.com/community/tutorials/openssl-essentials-working-with-ssl-certificates-private-keys-and-csrs?utm_content=openssl-essentials-working-with-ssl-certificates-private-keys-and-csrs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment