Come ottenere un certificato SSL per OpenLiteSpeed con Let’s Encrypt

Cerca

In questa guida utilizziamo i servizi offerti da Let’s Encrypt unitamente al client certbot per ottenere un certificato SSL gratuito con rinnovo automatico per il nostro server OpenLiteSpeed.

Applicare il certificato

Metodo 1 - Interattivo

Lanciare il seguente comando

				
					certbot certonly
				
			

Otterremo la seguente risposta:

				
					How would you like to authenticate with the ACME CA?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: Spin up a temporary webserver (standalone)
2: Place files in webroot directory (webroot)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate number [1-2] then [enter] (press 'c' to cancel):
				
			

Digitiamo il valore appropriato [1-2]. In generale è l’opzione 2.

Otterremo la seguente risposta

				
					Plugins selected: Authenticator webroot, Installer None Please enter in your domain name(s) (comma and/or space separated) (Enter 'c' to cancel):
				
			

Inseriamo il nostro nome di dominio

				
					mydomain.com
				
			

Otterremo la seguente risposta

				
					Obtaining a new certificate
Performing the following challenges:
http-01 challenge for mydomain.com
Input the webroot for mydomain.com: (Enter 'c' to cancel):
				
			

Inseriamo il percorso del nostro sito web

				
					/usr/local/lsws/Example/html
				
			

Attendiamo che il certificato venga correttamente generato. Otterremo la seguente risposta

				
					Waiting for verification...
Cleaning up challenges
IMPORTANT NOTES:
- Congratulations! Your certificate and chain have been saved at: /etc/letsencrypt/live/mydomain.com/fullchain.pem
Your key file has been saved at: /etc/letsencrypt/live/mydomain.com/privkey.pem
Your cert will expire on 2022-04-24. To obtain a new or tweaked version of this certificate in the future, simply run certbot again. To non-interactively renew *all* of your certificates, run "certbot renew"
- If you like Certbot, please consider supporting our work by:
Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate Donating to EFF: https://eff.org/donate-le
				
			
Metodo 2 - Non interattivo

Per richiedere un certificato per il dominio mydomain.com lanciamo il seguente comando

				
					certbot certonly --non-interactive --agree-tos -m demo@gmail.com --webroot -w /usr/local/lsws/your-folder/html -d mydomain.com
				
			

Il seguente comando è invece per richiedere un certificato sia per mydomain.com che per www.mydomain.com

				
					certbot certonly --non-interactive --agree-tos -m demo@gmail.com --webroot -w /usr/local/lsws/your-folder/html -d mydomain.com -d www.mydomain.com
				
			

Configurazione Virtual Host su OpenLiteSpeed

Dalla console di OpenLiteSpeed navigare a Virtual Hosts > YOUR VIRTUAL HOST > SSL ed impostare i seguenti valori:

  • Private Key File: /etc/letsencrypt/live/YOUR_DOMAIN/privkey.pem
  • Certificate File: /etc/letsencrypt/live/YOUR_DOMAIN/fullchain.pem

Lascia un commento

Il tuo indirizzo email non sarà pubblicato. I campi obbligatori sono contrassegnati *

Questo sito utilizza Akismet per ridurre lo spam. Scopri come vengono elaborati i dati derivati dai commenti.

Most Recent

Come creare un watchdog per Cups

In questo scenario ci troviamo su una macchina Linux in cui abbiamo bisogno di monitorare lo stato di Cups e, in caso di crash del

Partners