Apache HTTP Server: differenze tra le versioni

Riga 314: Riga 314:
In sintesi quello che succede è che il file di conf originale, cioè <code>mio_sito.conf</code>, viene modificato in modo da reindirizzare tutte le richieste dirette al virtualhost configurato sulla porta 80 a quello sulla porta 443, ovvero ogni richiesta http viene automaticamente convertita in una https.<br>
In sintesi quello che succede è che il file di conf originale, cioè <code>mio_sito.conf</code>, viene modificato in modo da reindirizzare tutte le richieste dirette al virtualhost configurato sulla porta 80 a quello sulla porta 443, ovvero ogni richiesta http viene automaticamente convertita in una https.<br>
Se non si avesse alcun interesse a mantenere il virtualhost sulla porta 80 si può disabilitare/eliminare il file <code>mio_sito.conf</code> senza problemi, tuttavia è bene sapere che tutte le richieste http non verranno più inoltrate automaticamente su https, quindi l'utente si vedrà restituire dal webserver un errore ''403 Forbidden'' (è quindi fondamentale che chi già fruiva in precedenza del sito sia informato del cambio).
Se non si avesse alcun interesse a mantenere il virtualhost sulla porta 80 si può disabilitare/eliminare il file <code>mio_sito.conf</code> senza problemi, tuttavia è bene sapere che tutte le richieste http non verranno più inoltrate automaticamente su https, quindi l'utente si vedrà restituire dal webserver un errore ''403 Forbidden'' (è quindi fondamentale che chi già fruiva in precedenza del sito sia informato del cambio).
==== Rinnovo dei certificati ====
Certbot permette di rinnovare in automatico tutti i propri certificati con il comando <code>certbot renew</code>. Per testare subito che il predetto comando funzioni è possibile usare l'opzione <code>--dry-run</code>, ovvero:
<pre># certbot renew --dry-run</pre>
Che in caso di successo dovrebbe restituire qualcosa di simile a:
<pre>
Saving debug log to /var/log/letsencrypt/letsencrypt.log
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Processing /etc/letsencrypt/renewal/ind1.mio_dominio.abc.conf
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Cert not due for renewal, but simulating renewal for dry run
Plugins selected: Authenticator apache, Installer apache
Renewing an existing certificate
Performing the following challenges:
http-01 challenge for ind1.mio_dominio.abc
Waiting for verification...
Cleaning up challenges
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
new certificate deployed with reload of apache server; fullchain is
/etc/letsencrypt/live/ind1.mio_dominio.abc/fullchain.pem
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
** DRY RUN: simulating 'certbot renew' close to cert expiry
**          (The test certificates below have not been saved.)
Congratulations, all renewals succeeded. The following certs have been renewed:
  /etc/letsencrypt/live/ind1.mio_dominio.abc/fullchain.pem (success)
** DRY RUN: simulating 'certbot renew' close to cert expiry
**          (The test certificates above have not been saved.)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IMPORTANT NOTES:
- Your account credentials have been saved in your Certbot
  configuration directory at /etc/letsencrypt. You should make a
  secure backup of this folder now. This configuration directory will
  also contain certificates and private keys obtained by Certbot so
  making regular backups of this folder is ideal.
</pre>


==== Errori ====
==== Errori ====
2 853

contributi