tru3n0 >>> blog / 73 posts / categories / 68 comments / feed / comments feed

Instalar y configurar Apache 2 + SSL en Debian Etch

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/ :)

1 Comment

  1. Andrés — November 28, 2008 #

    Excelente guia, muchas gracias!!!!

Leave a comment