Criar Certificado Autoassinado Apache2
Criar Certificado Autoassinado Apache2
tips/pt-br/apache-pt-br/habilitar-https-no-apache/
1 of 13 06/07/2022 23:31
Tutorial - Habilitar HTTPS no Apache [ Passo a passo ] https://techexpert.tips/pt-br/apache-pt-br/habilitar-https-no-apache/
2 of 13 06/07/2022 23:31
Tutorial - Habilitar HTTPS no Apache [ Passo a passo ] https://techexpert.tips/pt-br/apache-pt-br/habilitar-https-no-apache/
3 of 13 06/07/2022 23:31
Tutorial - Habilitar HTTPS no Apache [ Passo a passo ] https://techexpert.tips/pt-br/apache-pt-br/habilitar-https-no-apache/
apt-get update
apt-get install apache2 openssl
4 of 13 06/07/2022 23:31
Tutorial - Habilitar HTTPS no Apache [ Passo a passo ] https://techexpert.tips/pt-br/apache-pt-br/habilitar-https-no-apache/
a2enmod ssl
a2enmod rewrite
vi /etc/apache2/apache2.conf
<Directory /var/www/html>
AllowOverride All
</Directory>
mkdir /etc/apache2/certificate
cd /etc/apache2/certificate
openssl req -new -newkey rsa:4096 -x509 -sha256 -days 365 -nodes -out apache-certificate.crt
5 of 13 06/07/2022 23:31
Tutorial - Habilitar HTTPS no Apache [ Passo a passo ] https://techexpert.tips/pt-br/apache-pt-br/habilitar-https-no-apache/
vi /etc/apache2/sites-enabled/000-default.conf
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
<VirtualHost *:443>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
SSLEngine on
SSLCertificateFile /etc/apache2/certificate/apache-certificate.crt
SSLCertificateKeyFile /etc/apache2/certificate/apache.key
</VirtualHost>
<VirtualHost *:80>
RewriteEngine On
6 of 13 06/07/2022 23:31
Tutorial - Habilitar HTTPS no Apache [ Passo a passo ] https://techexpert.tips/pt-br/apache-pt-br/habilitar-https-no-apache/
7 of 13 06/07/2022 23:31
Tutorial - Habilitar HTTPS no Apache [ Passo a passo ] https://techexpert.tips/pt-br/apache-pt-br/habilitar-https-no-apache/
9 of 13 06/07/2022 23:31
Tutorial - Habilitar HTTPS no Apache [ Passo a passo ] https://techexpert.tips/pt-br/apache-pt-br/habilitar-https-no-apache/
10 of 13 06/07/2022 23:31
Tutorial - Habilitar HTTPS no Apache [ Passo a passo ] https://techexpert.tips/pt-br/apache-pt-br/habilitar-https-no-apache/
11 of 13 06/07/2022 23:31
Tutorial - Habilitar HTTPS no Apache [ Passo a passo ] https://techexpert.tips/pt-br/apache-pt-br/habilitar-https-no-apache/
12 of 13 06/07/2022 23:31
Tutorial - Habilitar HTTPS no Apache [ Passo a passo ] https://techexpert.tips/pt-br/apache-pt-br/habilitar-https-no-apache/
13 of 13 06/07/2022 23:31