Diferenças
Aqui você vê as diferenças entre duas revisões dessa página.
Ambos lados da revisão anterior Revisão anterior | |||
certificados_digitais:config_apache [2014/07/12 11:58] – aracnus | certificados_digitais:config_apache [2017/04/18 18:29] (atual) – removida aracnus | ||
---|---|---|---|
Linha 1: | Linha 1: | ||
- | ====== Geração e configuração dos certificados no Apache ====== | ||
- | |||
- | Em primeiro lugar, o módulo //ssl// do //Apache// deve estar ativo. O comando para ativá-lo é: | ||
- | |||
- | a2enmod ssl | ||
- | |||
- | Once Apache is running with mod_ssl you'll have to register the domain component of your webserver (that is " | ||
- | |||
- | Get openssl if it is not already installed on your system. If you can't find it somewhere else you can try the openssl website for a binary version for Windows. | ||
- | Generate a certificate signing request (CSR) using the command: | ||
- | |||
- | Crie os dois arquivos necessários para a geração e o uso do certificado no //Apache// com o seguinte comando: | ||
- | |||
- | '' | ||
- | |||
- | E crie um arquivo texto em branco para armazenar o conteúdo do certificado que será gerado: | ||
- | |||
- | touch <nome do arquivo do certificado> | ||
- | |||
- | O padrão de nomes utilizados em nosso VPS é: | ||
- | |||
- | * **Arquivo da chave privada:** domínio_subdomínio-key.pem (ex. // | ||
- | * **Arquivo da CSR:** domínio_subdomínio-csr.pem (ex. // | ||
- | * **Arquivo do certificado: | ||
- | |||
- | Após isso, entre no [[http:// | ||
- | |||
- | Novamente, copie **todo** o conteúdo gerado (inclusive as linhas // | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | Go to CACert, log in, and select " | ||
- | |||
- | Use Copy/Paste to input your CSR (the content of example_csr.pem in the above example) into the big editor box. Be sure to include the header and footer lines ( -----BEGIN CERTIFICATE REQUEST----- | ||
- | |||
- | Click on " | ||
- | Use Copy/Paste with your favourite editor to save the certificate to a file (let's call the file example_cert.pem). | ||
- | Move the private key and the certificate to a convenient location. Standard Apache installations provide the directories ssl.key for the private key and ssl.crt for the certificate in the configuration directory. If you want to keep the CSR for later reference (though you probably won't need it anymore) there also is a directory named ssl.csr. | ||
- | |||
- | If using a Class 3 certificate as proposed you'll need the certificate chain file. This is just the Class 3 root certificate and the Class 1 root certificate in PEM format concatenated. Do it yourself or download it from the attachments. | ||
- | Store the certificate chain file in the ssl.crt directory and let's call it CAcert_chain.pem for future reference. | ||
- | Now all that remains to be done is to correctly configure Apache' | ||
- | |||
- | SSLCertificateFile <Path to your certificate file>/ | ||
- | SSLCertificateKeyFile <Path to your key file>/ | ||
- | SSLCertificateChainFile <Path to your chain file>/ | ||
- | | ||
- | |||
- | This is it. Restart your Apache and see if it works! | ||
- | |||
- | http:// | ||