HTTPS
apt-get install openssl
apt-get install git
git clone https://github.com/letsencrypt/letsencryp
Instalación
Si todo salio bien
Nos saldrá un mensaje similar
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