Para instalar Apache 2 tecleamos:

apt-get install apache2

Ahora instalaremos openssl:

apt-get install openssl ssl-cert

Para activar el mod ssl tecleamos:

a2enmod ssl

Ahora generaremos el certificado con el siguiente comando:

openssl req $@ -new -x509 -days 365 -nodes -out /etc/apache2/apache.pem -keyout /etc/apache2/apache.pem

Cambiamos los permisos del fichero:

chmod 600 /etc/apache2/apache.pem

Y por útlimo editamos la configuración del servidor Apache, primero el fichero /etc/apache2/ports.conf y añadimos la siguiente línea:

Listen 443

También modificamos el fichero de nuestro virtual host y cambiamos la línea

NameVirtualHost *

Por estas dos:

NameVirtualHost *:80 NameVirtualHost *:443

Y añadimos dentro del tag <VirtualHost *>

SSLEngine on SSLCertificateFile /etc/apache2/apache.pem

Ahora ya debería funcionar la url https://localhost/

Origen: http://tru3n0.com/index.php/2008/03/26/instalar-y-configurar-apache-2-ssl-en-debian-etch/

, ,
Trackback

no comment untill now

Add your comment now