quinta-feira, 17 de outubro de 2019

Criar um Self-Signed SSL Certificate para Apache no Ubuntu 18.04


Cria-se os certificados com o comando, onde precisará responder algumas configurações básicas de informações do mesmo:
sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/apache-selfsigned.key -out /etc/ssl/certs/apache-selfsigned.crt
Necessário criar um novo arquivo de parametros do SSL com o comando
sudo nano /etc/apache2/conf-available/ssl-params.conf
e colocar as seguintes informações neste arquivo recem criado
SSLCipherSuite EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH
SSLProtocol All -SSLv2 -SSLv3 -TLSv1 -TLSv1.1
SSLHonorCipherOrder On
# Disable preloading HSTS for now.  You can use the commented out header line that includes
# the "preload" directive if you understand the implications.
# Header always set Strict-Transport-Security "max-age=63072000; includeSubDomains; preload"
Header always set X-Frame-Options DENY
Header always set X-Content-Type-Options nosniff
# Requires Apache >= 2.4
SSLCompression off
SSLUseStapling on
SSLStaplingCache "shmcb:logs/stapling-cache(150000)"
# Requires Apache >= 2.4.11
SSLSessionTickets Off

No arquivo /etc/apache2/sites-available/default-ssl.conf é necessário substituir estas linhas:
SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
Por estas:
SSLCertificateFile /etc/ssl/certs/apache-selfsigned.crt SSLCertificateKeyFile /etc/ssl/private/apache-selfsigned.key
Se o firewall estiver ativo, é necessário fazer alguns ajustes. Para conferir seu status, execute:
sudo ufw status
Ative alguns modulos do Apache:
sudo a2enmod ssl
sudo a2enmod headers
sudo a2ensite default-ssl
sudo a2enconf ssl-params
Para conferir se o Apache foi corretamente configurado, execute
sudo apache2ctl configtest
Se tudo estiver certo, deve ter como resposta a seguinte mensagem:
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message Syntax OK
Feito tudo isto, basta reiniciar o Apache:
sudo systemctl restart apache2
fonte: https://www.digitalocean.com/community/tutorials/how-to-create-a-self-signed-ssl-certificate-for-apache-in-ubuntu-18-04

Nenhum comentário:

Postar um comentário

Instalando SicoobEmpresarial

Já tendo o java instalado e baixado o arquivo .jnlp, execute javaws InstaladorSicoobnetEmpresarial.jnlp Talvez seja necessário instalar...