Ao usar este site, você concorda com o política de Privacidade.
Aceitar
Entrar em TIEntrar em TIEntrar em TI
  • LAR
  • PROFISSIONAL DE TI
  • TECNOLOGIA
  • Microsoft
    • Azul
    • ConfigMgr/SCCM
    • PMD
    • Orquestrador
    • Hiper-V
    • Microsoft Edge Insider
    • MSI
    • Escritório 365
    • Office Insider
    • Power BI
    • Skype
    • Servidor SQL
    • Equipes
  • WINDOWS
    • Centro de Administração do Windows
    • Cliente Windows
    • Servidor Windows
  • Lista de coleta de consultas SCCM
Leitura: Nginx HTTPS setup with a self-signed SSL certificate
Redimensionador de fontesAh
Entrar em TIEntrar em TI
Redimensionador de fontesAh
  • LAR
  • PROFISSIONAL DE TI
  • TECNOLOGIA
  • Microsoft
  • WINDOWS
  • Lista de coleta de consultas SCCM
Procurar
  • LAR
  • PROFISSIONAL DE TI
  • TECNOLOGIA
  • Microsoft
    • Azul
    • ConfigMgr/SCCM
    • PMD
    • Orquestrador
    • Hiper-V
    • Microsoft Edge Insider
    • MSI
    • Escritório 365
    • Office Insider
    • Power BI
    • Skype
    • Servidor SQL
    • Equipes
  • WINDOWS
    • Centro de Administração do Windows
    • Cliente Windows
    • Servidor Windows
  • Lista de coleta de consultas SCCM
Linux

Nginx HTTPS setup with a self-signed SSL certificate

Publicado em agosto 26, 2024
2 Leitura mínima
COMPARTILHAR

Nginx HTTPS setup with a self-signed SSL certificate.

It’s not recommended to use HTTPS without a valid SSL/TLS certificate. The certificate is used to encrypt communication between the server and client, and without a valid certificate, the connection will not be encrypted and will be vulnerable to attacks.

No entanto, if you still want to use HTTPS without a valid SSL/TLS certificate, you can do so by using a self-signed certificate or a certificate issued by a private Certificate Authority (CA). Here’s how to do it using nginx:

  1. Generate a self-signed certificate:
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/nginx/ssl/nginx-selfsigned.key -out /etc/nginx/ssl/nginx-selfsigned.crt

This command generates a self-signed certificate and key with a validity of 365 days and saves them to /etc/nginx/ssl/nginx-selfsigned.key e /etc/nginx/ssl/nginx-selfsigned.crt respectively.

  1. Configure nginx to use the self-signed certificate:
server {
    listen 443 ssl;
    server_name example.com;
    ssl_certificate /etc/nginx/ssl/nginx-selfsigned.crt;
    ssl_certificate_key /etc/nginx/ssl/nginx-selfsigned.key;

    # other server configurations
}

This configuration tells nginx to listen on port 443 (Https) and use the self-signed certificate and key for SSL/TLS encryption.

Note that self-signed certificates are not trusted by default by web browsers and will result in a warning message when a user tries to access the website. To avoid this, you can install the self-signed certificate on the client devices or use a valid SSL/TLS certificate issued by a trusted CA.

MARCADO:AlmaLinuxCentOSLinuxNGINXUbuntu
Artigo Anterior Secure and Seamless: Enabling Single Sign-On for Grafana
Próximo artigo Smoothly Upgrading from Ubuntu 18 to Ubuntu 20
Deixe um comentário Deixe um comentário

Deixe uma resposta Cancelar resposta

Seu endereço de e-mail não será publicado. Os campos obrigatórios estão marcados *

Este site usa Akismet para reduzir spam. Saiba como os dados dos seus comentários são processados.

Tradução

English中文(简体)DanskNederlandsFrançaisDeutschItaliano한국어PolskiPortuguêsRomânăEspañolУкраїнська
 Editar tradução
por Transposh - translation plugin for wordpress

Postagens populares

Requisitos do sistema para Windows Server 2016
Servidor Windows
Lista de coleta de consultas do Configuration Manager
Lista de coleta de consultas do Configuration Manager
ConfigMgr
Navegação estruturada/gerenciada habilitada em páginas modernas em sites de equipe clássicos
Tecnologia
SCCM Falha ao obter locais de DP como a versão esperada do MP
ConfigMgr

Postagens recentes

Instalando e configurando Fail2ban para proteção SSH no Ubuntu 24.04
Linux
Habilitando e configurando FirewallD no AlmaLinux
Linux
Criação de usuário e configuração de chave SSH no AlmaLinux
Linux
Como redefinir a senha no AlmaLinux
Linux

© 2023 Entrar em TI

Vá para a versão móvel
banner
Bem vindo de volta!

Faça login na sua conta

Nome de usuário ou endereço de e-mail
Senha

Perdeu sua senha?