Skip to content

Instantly share code, notes, and snippets.

@alphanetEX
Last active August 4, 2017 15:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alphanetEX/0fe46ea0f32122268ac7a443bf5752a3 to your computer and use it in GitHub Desktop.
Save alphanetEX/0fe46ea0f32122268ac7a443bf5752a3 to your computer and use it in GitHub Desktop.
Configuracion de certificados SSL Debian y Ubuntu
apt-get install openssl
apt-get install openssl openssl-blacklist-extra
cd /etc/apache2/
openssl genrsa -des3 -out LLaveSSL.key
openssl req -new -key LLaveSSL.key -out miCertificado.csr
-------------------------------------------------Imagen Shutter---------------------------------------------
Country Name (2 letter code) [AU]:SV
State or Province Name (full name) [Some-State]:
Locality Name (eg, city) []:San Salvador
Organization Name (eg, company) [Internet Widgits Pty Ltd]:'name of business'
Organizational Unit Name (eg, section) []:'name of organitation '
Common Name (e.g. server FQDN or YOUR name) []:'name of server'
Email Address []:'your e-mail'
------------------------------------------------------------------------------------------------------------
openssl x509 -req -days 365 -in miCertificado.csr -signkey LLaveSSL.key -out miCertificadofirmado.crt
sudo a2enmod efault-ssl
cp miCertificadofirmado.crt /etc/ssl/certs/
cp LLaveSSL.key /etc/ssl/private/
cd /etc/apache2/sites-available/
nano nano default-ssl.conf
--buscar la directiva 'SSLCertificateFile directive is needed.'
reemplazar las 2 siguientes directivas
SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
--por los certificados creados anteriormente mas una sintaxis adicional
SSLOptions +FakeBasicAuth -StrictRequire
SSLCertificateFile /etc/ssl/certs/miCertificadofirmado.crt
SSLCertificateKeyFile /etc/ssl/private/LLaveSSL.key
a2ensite de default-ssl
test on https://'ip address or DNS'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment