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/ ![]()
- Posted by tru3n0 at 12:01 pm
- Permalink for this entry
- Filed under: Apache
- RSS comments feed of this entry
- TrackBack URI
No comments
Leave a comment