Gestione di certificati SSL in Windows con Letsencrypt
Jump to navigation
Jump to search
Installazione di letsencrypt-win-simple
- Scaricare
https://github.com/Lone-Coder/letsencrypt-win-simple/releases
- Scompattare l'archivio in
C:\Program Files\letsencrypt-win-simple
- Se tutti i siti sono sotto il "Default Site" di IIS, non server fare nulla
- Se le webroot dei virtualhost di tutti i cname sono diversi, far puntare tutte le directory .well-known alla directory del Default site, facendo un link,. In pratica tutte le richieste per l'host principale e tutti i SAN devono essere servite dalla stessa directory, che letesencrypt chiama webroot. Ad esempio:
cd \path-to-virtualhost-webroot mklink /d .well-known C:\inetpub\wwwroot\.well-knonw
- Copiare il file di configurazione di IIS per poter servire i files di autenticazione, altrimenti i files non saranno visibili:
C:\inetpub\lms.promarsa.net>copy "c:\Program Files\letsencrypt-win-simple\Web_Config.xml" c:\inetpub\wwwroot\.well-known\web.config
- Creare la directory dove verranno salvati i certificati .pfx:
mkdir C:\ssl.test mkdir C:\ssl
Creazione di un certificato con SAN per installazione manuale
- Generare il certificato in test lanciando:
C:\Program Files\letsencrypt-win-simple> letsencrypt.exe --accepttos --keepexisting --webroot C:\inetpub\wwwroot --centralsslstore C:\ssl.test --san --test
- Inserire un indirizzo email per notifiche in caso di errori o altro:
Enter an email address (not public, used for renewal fail notices): admin@example.com
- Scegliere M
Scanning IIS Sites 2: SAN - IIS test.promarsa.net (C:\inetpub\test.promarsa.net) 6: SAN - IIS temp_FDS (C:\inetpub\test.promarsa.net\temp_FDS) W: Generate a certificate via WebDav and install it manually. S: Generate a single San certificate for multiple sites. F: Generate a certificate via FTP/ FTPS and install it manually. M: Generate a certificate manually. A: Get certificates for all hosts Q: Quit Which host do you want to get a certificate for: M
- Inserire il nome principale dell'host:
Enter a host name: test.example.com
- Inserire tutti i SAN separati da virgola (fino a 100):
Enter all Alternative Names seperated by a comma test.example.com, test.host1.example.com,test.host3.example.com
- Specificare la webroot dove verranno posizionati e serviti i files di autorizzazione:
Enter a site path (the web root of the host for http authentication): C:\inetpub\wwwroot
- Ora i files di autorizzazione verranno messi in C:\inetpub\wwwroot e verranno richiesti come
http://test.example.com/.well-known/acme-challenge/qualcosa http://test.host1.example.com/.well-known/acme-challenge/qualcosa http://test.host2.example.com/.well-known/acme-challenge/qualcosa
- Rispondere N
Do you want to install the .pfx into the Certificate Store/ Central SSL Store? (Y/N) N
- I certificati .PFX saranno in C:\ssl.test
- I ceritifcati .pem saranno in C:\Users\Administrator\AppData\Roaming\letsencrypt-win-simple\httpsacme-staging.api.letsencrypt.org
- Se tutto è ok, procedere con i certificati veri e propri:
C:\Program Files\letsencrypt-win-simple> letsencrypt.exe --accepttos --keepexisting --webroot C:\inetpub\wwwroot --centralsslstore C:\ssl --san
- Ripetere gli stessi parametri di prima
- Rispondere Y
Do you want to install the .pfx into the Certificate Store/ Central SSL Store? (Y/N) Y
- I certificati .PFX saranno in C:\ssl
- I ceritifcati .pem saranno in C:\Users\Administrator\AppData\Roaming\letsencrypt-win-simple\httpsacme-v01.api.letsencrypt.org