Tutoriais
nano san.cnf
[req] distinguished_name = req_distinguished_name req_extensions = v3_req prompt = no [req_distinguished_name] C = BR ST = DF L = Brasília O = OU = CN = [v3_req] keyUsage = keyEncipherment, dataEncipherment extendedKeyUsage = serverAuth subjectAltName = @alt_names [alt_names] DNS.1 = DNS.2 =
openssl req -out .csr -new -newkey rsa:2048 -nodes -keyout .key -config san.cnf
cat .csr
chown :
openssl x509 -inform PEM -in .cer -out .crt
cd /etc/apache2/sites-available/
nano .conf
cp .conf .conf
<VirtualHost :443> ServerName
DocumentRoot "/var/www/html/<'site'>"
<Directory "/var/www/html"> Options Indexes FollowSymLinks MultiViews AllowOverride None Require all granted
SSLEngine on SSLCertificateFile "/home/josue.bruno/certificados//.crt" SSLCertificateKeyFile "/home/josue.bruno/certificados//.key"
ErrorLog "/var/log/apache2/.ipea.gov.br-443_error.log" ServerSignature Off CustomLog "/var/log/apache2/.ipea.gov.br-443_access.log" "combined" env=!viaproxy CustomLog "/var/log/apache2/.ipea.gov.br-443_access.log" "forwarded" env=viaproxy SetEnvIf X-Forwarded-For "^......." viaproxy
Redirect / https://seusite.contoso.com.br/
SetEnvIf X-Forwarded-For "^......." viaproxy