letsencrypt.org

HTTPS

Requisitos

  1. apt-get install openssl
  2. a2enmod ssl
  3. service apache2 reload
  4. apt-get install git
  5. git clone https://github.com/letsencrypt/letsencryp

Instalación

  1. service apache2 stop
  2. cd letsencryp
  3. ./letsencrypt-auto --email samuel.loza@qkiez.com certonly  --standalone -d midominio.com

Si todo salio bien

Nos saldrá un mensaje similar

Iniciamos apache2

service apache2 start

Configurando

Nos dirigimos a las configuraciones de apache2 virtual server

nano /etc/apache2/sites-enabled/000-default

Nos dirigimos al final del archivo y creamos VirtualHost para https

Ejemplo 

<VirtualHost *:443>
        ServerAdmin webmaster@localhost
        ServerName 200.7.160.197
        ServerAlias jv.umsa.bo
        DocumentRoot /var/www/juezpatito

        <Directory /var/www/juezpatito>
        Options Indexes FollowSymLinks MultiViews
                AllowOverride All
                Order allow,deny
                allow from all
        </Directory>

# Custom VH settings (if any exist)

midominio.com remplazamos por el que pusimos en el paso de instalacion punto 3.

SSLEngine on
SSLProtocol ALL -SSLv2 -SSLv3
SSLHonorCipherOrder On
SSLCipherSuite ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS
SSLCertificateFile /etc/letsencrypt/live/jv.umsa.bo/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/jv.umsa.bo/privkey.pem
SSLCertificateChainFile /etc/letsencrypt/live/jv.umsa.bo/chain.pem
# Keeping bellow for future upgrades.
# Requires Apache >= 2.4
SSLCompression off
</virtualhost>

Hay que dirigir todo el trafico del http al https

<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    ServerName 200.7.160.197
    ServerAlias jv.umsa.bo    
    DocumentRoot /var/www/juezpatito
    
    <Directory /var/www/juezpatito>
    Options Indexes FollowSymLinks MultiViews
                AllowOverride All
                Order allow,deny
                allow from all
    </Directory>

RewriteEngine on
ReWriteCond %{SERVER_PORT} !^443$
RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [NC,R,L]

Eso es todo :D

Https

By Samuel LR

Https

  • 294