This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
informatica:servidor_internet_2009_http_to_https [2022/09/27 15:35] miquel [xxxx] |
— (current) | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Servidor web/dades ====== | ||
- | |||
- | ===== Actualització d'HTTP a HTTPS amb certificats LetsEncrypt - Setembre de 2022 ===== | ||
- | |||
- | Cal convertir el servidor HTTP en HTTPS. He descartat les opcions de fer-ho amb un certificat auto-signat (self-signed) o amb un certificat aconseguit a través del Servei d' | ||
- | |||
- | Això ens deixa l' | ||
- | |||
- | Aquesta pàgina conté la descripció detallada del procés d' | ||
- | |||
- | |||
- | ==== Desinstal·lació del paquet certbot de la distribució ==== | ||
- | |||
- | El paquet '' | ||
- | |||
- | < | ||
- | automatically configure HTTPS using Let's Encrypt | ||
- | |||
- | The objective of Certbot, Let's Encrypt, and the ACME (Automated Certificate Management Environment) protocol is to make it possible to set up an HTTPS server and have it automatically obtain a browser-trusted certificate, | ||
- | |||
- | This agent is used to: | ||
- | |||
- | - Automatically prove to the Let's Encrypt CA that you control the website | ||
- | - Obtain a browser-trusted certificate and set it up on your web server | ||
- | - Keep track of when your certificate is going to expire, and renew it | ||
- | - Help you revoke the certificate if that ever becomes necessary. | ||
- | |||
- | This package contains the main application, | ||
- | |||
- | < | ||
- | https:// | ||
- | </ | ||
- | |||
- | </ | ||
- | |||
- | La versió disponible per Debian 10 és la [[https:// | ||
- | |||
- | Començo per desintal·lar el paquet '' | ||
- | |||
- | < | ||
- | # apt purge certbot | ||
- | Reading package lists... Done | ||
- | Building dependency tree | ||
- | Reading state information... Done | ||
- | The following packages were automatically installed and are no longer required: | ||
- | python-pyicu python3-acme python3-certbot python3-configargparse python3-configobj python3-future python3-josepy python3-mock | ||
- | python3-parsedatetime python3-pbr python3-requests-toolbelt python3-rfc3339 python3-tz python3-zope.component python3-zope.event | ||
- | python3-zope.hookable python3-zope.interface | ||
- | Use 'apt autoremove' | ||
- | The following packages will be REMOVED: | ||
- | certbot* | ||
- | 0 upgraded, 0 newly installed, 1 to remove and 39 not upgraded. | ||
- | After this operation, 70.7 kB disk space will be freed. | ||
- | Do you want to continue? [Y/n] | ||
- | (Reading database ... 254784 files and directories currently installed.) | ||
- | Removing certbot (0.31.0-1+deb10u1) ... | ||
- | Processing triggers for man-db (2.8.5-2) ... | ||
- | (Reading database ... 254773 files and directories currently installed.) | ||
- | Purging configuration files for certbot (0.31.0-1+deb10u1) ... | ||
- | root@sermnserver:/ | ||
- | Reading package lists... Done | ||
- | Building dependency tree | ||
- | Reading state information... Done | ||
- | The following packages will be REMOVED: | ||
- | python-pyicu python3-acme python3-certbot python3-configargparse python3-configobj python3-future python3-josepy python3-mock | ||
- | python3-parsedatetime python3-pbr python3-requests-toolbelt python3-rfc3339 python3-tz python3-zope.component python3-zope.event | ||
- | python3-zope.hookable python3-zope.interface | ||
- | 0 upgraded, 0 newly installed, 17 to remove and 39 not upgraded. | ||
- | After this operation, 6,955 kB disk space will be freed. | ||
- | Do you want to continue? [Y/n] | ||
- | (Reading database ... 254769 files and directories currently installed.) | ||
- | Removing python-pyicu (2.2-2) ... | ||
- | Removing python3-certbot (0.31.0-1+deb10u1) ... | ||
- | |||
- | [...] | ||
- | |||
- | Removing python3-zope.event (4.2.0-1) ... | ||
- | Removing python3-zope.hookable (4.0.4-4+b4) ... | ||
- | Removing python3-zope.interface (4.3.2-1+b2) ... | ||
- | </ | ||
- | |||
- | ==== Instal·lació del gestor de paquets " | ||
- | |||
- | Tot seguit instal·lo el paquet '' | ||
- | |||
- | < | ||
- | # apt install snapd | ||
- | Reading package lists... Done | ||
- | Building dependency tree | ||
- | Reading state information... Done | ||
- | The following additional packages will be installed: | ||
- | liblzo2-2 squashfs-tools | ||
- | The following NEW packages will be installed: | ||
- | liblzo2-2 snapd squashfs-tools | ||
- | 0 upgraded, 3 newly installed, 0 to remove and 39 not upgraded. | ||
- | Need to get 14.4 MB/14.5 MB of archives. | ||
- | After this operation, 61.5 MB of additional disk space will be used. | ||
- | Do you want to continue? [Y/n] | ||
- | Get:1 http:// | ||
- | Get:2 http:// | ||
- | Fetched 14.4 MB in 2s (6,188 kB/s) | ||
- | Selecting previously unselected package liblzo2-2: | ||
- | (Reading database ... 253947 files and directories currently installed.) | ||
- | Preparing to unpack .../ | ||
- | Unpacking liblzo2-2: | ||
- | Selecting previously unselected package squashfs-tools. | ||
- | Preparing to unpack .../ | ||
- | Unpacking squashfs-tools (1: | ||
- | Selecting previously unselected package snapd. | ||
- | Preparing to unpack .../ | ||
- | Unpacking snapd (2.37.4-1+deb10u1) ... | ||
- | Setting up liblzo2-2: | ||
- | Setting up squashfs-tools (1: | ||
- | Setting up snapd (2.37.4-1+deb10u1) ... | ||
- | Created symlink / | ||
- | Created symlink / | ||
- | Created symlink / | ||
- | Created symlink / | ||
- | Processing triggers for mime-support (3.62) ... | ||
- | Processing triggers for libc-bin (2.28-10+deb10u1) ... | ||
- | Processing triggers for man-db (2.8.5-2) ... | ||
- | Processing triggers for desktop-file-utils (0.23-4) ... | ||
- | |||
- | root@sermnserver:/ | ||
- | 2022-09-27T13: | ||
- | core 16-2.57.1 from Canonical✓ installed | ||
- | Channel latest/ | ||
- | 2022-09-27T13: | ||
- | core 16-2.57.2 from Canonical✓ refreshed | ||
- | </ | ||
- | |||
- | ==== Instal·lacíó del paquet certbot dels desenvolupadors ==== | ||
- | |||
- | Instal·lo el paquet '' | ||
- | |||
- | < | ||
- | # snap install --classic certbot | ||
- | certbot 1.30.0 from Certbot Project (certbot-eff✓) installed | ||
- | </ | ||
- | |||
- | i comprovo els contingut del paquet, | ||
- | |||
- | < | ||
- | # ls -l / | ||
- | -rw------- 2 root root 46661632 Sep 27 15:20 / | ||
- | |||
- | # unsquashfs -ll / | ||
- | Parallel unsquashfs: Using 2 processors | ||
- | 6937 inodes (7574 blocks) to write | ||
- | |||
- | drwxr-xr-x root/ | ||
- | drwxr-xr-x root/ | ||
- | -rw-r--r-- root/ | ||
- | -rw-r--r-- root/ | ||
- | -rw-r--r-- root/ | ||
- | -rw-r--r-- root/ | ||
- | -rwxr-xr-x root/ | ||
- | -rwxr-xr-x root/ | ||
- | |||
- | [...] | ||
- | |||
- | -rw-r--r-- root/ | ||
- | drwxr-xr-x root/ | ||
- | -rw-r--r-- root/ | ||
- | drwxr-xr-x root/ | ||
- | -rw-r--r-- root/ | ||
- | -rw-r--r-- root/ | ||
- | -rw-r--r-- root/ | ||
- | -rw-r--r-- root/ | ||
- | -rw-r--r-- root/ | ||
- | -rwxr-xr-x root/ | ||
- | </ | ||
- | |||
- | |||
- | |||
- | ==== Referències ==== | ||
- | |||
- | * [[https:// | ||
- | * [[https:// | ||
- | * [[https:// | ||
- | * [[https:// | ||
- | * [[https:// | ||
- | * [[https:// | ||
- | |||