Contenidos
Configuración de httpd-ssl.conf
1 2 3 4 5 6 7 8 9 10 11 12 |
<VirtualHost *:443> DocumentRoot "C:/xampp/htdocs/myproject/web" ServerName myproject SSLEngine on SSLCertificateFile "/etc/apache2/ssl/apache.crt" SSLCertificateKeyFile "/etc/apache2/ssl/apache.key" <Directory "C:/xampp/htdocs/myproject/web"> Options All AllowOverride All Require all granted </Directory> </VirtualHost> |
Pasos para crear el certificado con OpenSSL y utilizarlo en Apache
1 2 3 4 5 6 7 |
mkdir /etc/apache2/ssl openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/apache2/ssl/apache.key -out /etc/apache2/ssl/apache.crt cd /etc/apache2/ssl chown www-data:www-data apache.key apache.crt chmod 600 apache* a2enmod ssl systemctl restart apache2 |