Problema in riavvio apache non funziona correttamente

Installazione, configurazione e uso di Ubuntu come server: web, ftp, mail, news, proxy, dns e altro.
Avatar utente
Sam9999
Entusiasta Emergente
Entusiasta Emergente
Messaggi: 1983
Iscrizione: lunedì 9 giugno 2014, 8:59
Desktop: Studio Xfce
Distribuzione: Ubuntu 20.04 LTS (Focal)
Località: BO
Contatti:

Problema in riavvio apache non funziona correttamente

Messaggio da Sam9999 »

Quando riavvio il pc che ho configurato come server, siccome ho al momento configurato (prima un po' tutti) il localhost con una apertura sulla porta 443 per https://, il servizio apache non si riavvia correttamente ed i siti web configurati non funzionano.
Questo perché si blocca e chiede la frase di sicurezza per l'https: "Enter passphrase for SSL/TLS keys for sam-serve.localhost:443 (RSA)".
Se riavvio manualmente, la posso inserire e tutto riprende a funzionare, ma se il riavvio è automatico non funzionano i siti web.
Questo mi serve perché anche se il server magari è sempre acceso ed una volta avviato tutto funziona, ma in caso si dovesse riavviare per un qualsiasi motivo e senza supporto di amministratore di sistema, i siti web non funzionerebbero e quindi il server nel complesso resta down.
Ora posso mettere a mano la frase, ma per ipotetico riavvio in caso di mancanza di corrente od altro e con me non presente, sarebbe corretto che tutti i servizi fossero UP.
Ho anche settato il BIOS sul caso di mancanza e poi ritorno di corrente il computer si riavvia da solo, quindi sarebbe utile che non avesse bisogno di inserire la frase a mano.
Ultima modifica di Sam9999 il mercoledì 19 aprile 2017, 8:52, modificato 1 volta in totale.
-------------
S. @-M.
-------------
Avatar utente
Sam9999
Entusiasta Emergente
Entusiasta Emergente
Messaggi: 1983
Iscrizione: lunedì 9 giugno 2014, 8:59
Desktop: Studio Xfce
Distribuzione: Ubuntu 20.04 LTS (Focal)
Località: BO
Contatti:

Re: Problema in riavvio apache non funziona correttamente

Messaggio da Sam9999 »

Trovato in questo link come fare per settare apache a caricare la frase per https:
Rimuovere la PassPhrase

Codice: Seleziona tutto

 19
down vote
	

I've been guilty of removing the passphrase from my own key files in the past, because it's the simplest solution, but security-wise, it's not the best idea. An alternative is to feed the passphrase to Apache. You can do this with the SSLPassPhraseDialog option in your httpd.conf (or another file that it includes).

If you only have one SSL site on your server, the simplest form of this would be:

# either of these will work
SSLPassPhraseDialog |/path/to/passphrase-script
SSLPassPhraseDialog exec:/path/to/passphrase-script

You would then create a very simple script called /path/to/passphrase-script that contains something like the following:

#!/bin/sh
echo "put the passphrase here"

When starting up, Apache will take the output of this script and use it as the passphrase for your SSL key. If you have multiple SSL sites, SSLPassPhraseDialog has additional ways in which it can be used, so you can either have a single script for all of your keys, or a separate script for each, or however you want to do it.

and chmod +x /path/to/passphrase-script
-------------
S. @-M.
-------------
Scrivi risposta

Ritorna a “Ubuntu su server”

Chi c’è in linea

Visualizzano questa sezione: 0 utenti iscritti e 17 ospiti