© 2011 Manuel Méndez - Manuko
Documento bajo Licencia de Documentación Libre GNU/FDL
Última revisión: 20110212-15:18root@localhost:~# apt-get install openssl
[root@localhost ~]# yum install openssl
root@localhost:~/certs# openssl genrsa -des3 -out server.key 1024 Generating RSA private key, 1024 bit long modulus .................++++++ .....................++++++ e is 65537 (0x10001) Enter pass phrase for server.key: Verifying - Enter pass phrase for server.key: root@localhost:~/certs# cp server.key server.key.passphrase root@localhost:~/certs# openssl rsa -in server.key.passphrase -out server.key Enter pass phrase for server.key.passphrase: writing RSA key root@localhost:~/certs# openssl req -new -x509 -nodes -sha1 -days 365 /-key server.key -out server.crt You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank For some fields there will be a default value, If you enter '.', the field will be left blank. ----- Country Name (2 letter code) [AU]:ES State or Province Name (full name) [Some-State]:Barcelona Locality Name (eg, city) []:Barcelona Organization Name (eg, company) [Internet Widgits Pty Ltd]:Yomismo Organizational Unit Name (eg, section) []:Yomismo2 Common Name (eg, YOUR name) []:Manuko Email Address []:manuko@222.lll
root@localhost:~/certs# openssl req -new -key server.key -out server.csr
[root@localhost ~]# yum install mod_ssl
SSLEngine on
SSLCertificateFile /etc/apache2/ssl.crt/server.crt
SSLCertificateKeyFile /etc/apache2/ssl.crt/server.keyListen 80 443
NameVirtualHost aqui-mi-ip-publica:443
<VirtualHost aqui-mi-ip-publica:443>
ServerAdmin webmaster@https.ejemplo.org
DocumentRoot /var/www/virtuals/https.ejemplo.org
ServerName https.ejemplo.org
<Directory /var/www/virtuals/https.ejemplo.org>
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from All
</Directory>
SSLEngine on
SSLCertificateFile cert/server.crt
SSLCertificateKeyFile cert/server.key
ErrorLog logs/https.ejemplo.org_ssl-error_log
CustomLog logs/https.ejemplo.org_ssl-access_log common
</VirtualHost>
© 2011 Manuel Méndez - Manuko
Documento bajo Licencia de Documentación Libre GNU/FDL
Última revisión: 20110212-15:18