instalación certbot en un vps

Comandos y líneas de código:

3:22 deb http://ftp.debian.org/debian jessie-backports main

5:00 apt-get update && apt-get upgrade -y

5:38 apt-get install certbot -t jessie-backports

6:08 certbot certonly –webroot -w /var/www/html -d tudominio.com -d www.tudominio.com

9:05 

server {

 listen 443 ssl default; 

root /var/www/html; index index.php index.html index.htm; 

server_name tudominio.com www.tudominio.com; 

ssl_certificate /etc/letsencrypt/live/tudominio.com/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/tudominio.com/privkey.pem; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_prefer_server_ciphers on; ssl_ciphers ‘EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH’; 

location ~ /.well-known { allow all; } location / { 

# First attempt to serve request as file, then # as directory, then fall back to displaying a 404. #try_files $uri $uri/ =404; 

try_files $uri $uri/ /index.php?q=$uri&$args; } location ~ \.php$ { try_files $uri =404; fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } location ~ \.(jpg|jpeg|png|gif|ico|css|js)

$ { expires 365d; } location ~ \.(pdf)$ { expires 30d; } } 

server { listen 80 default_server; listen [::]:80 default_server; server_name tudominio.com www.tudominio.com; 

return 301 https://$host$request_uri;

12:27 service nginx restart 

13:50 crontab -e 

14:38 @daily certbot renew –pre-hook «service nginx stop» –post-hook «service nginx start»

 

Deja un comentario

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *