poniedziałek, 25 kwietnia 2011

HOWTO: SSL Certificate, jak wygenerować swój certyfikat?

1. Do Apache należy pobrać openssl, chyba, że już ma i go włączyć jako moduł.
Więcej informacji: http://www.thompsonbd.com/tutorials/apachessl.php
 2. W wygenerowaniu klucza, żadania certyfikatu i tymcz. certyfikatu posłuży:

-----------------------Zapisz to jako plik bat - ułatwi życie
@echo off
echo .
echo Zostanie utworzone Zadanie klucza CSR my-server.csr
echo Zapamietaj haslo PEM!
echo .
pause
openssl req -config openssl.cnf -new -out my-server.csr
cls
echo Plik
my-server.csr jest żądniem wystawienia certyfikatu i jego wkleja się do jednostki 
echo certyfikującej
echo Zostanie zdjete haslo z klucza prywatnego private.pem do my-server.key
echo Tutaj musisz wpisac haslo PEM!
echo .
openssl rsa -in privkey.pem -out my-server.key
cls
echo Zostanie recznie wygenerowany klucz my-server.cert
echo Normalnie powinien on zostac dostarczony z jednostki certyfikujacej
pause
openssl x509 -in my-server.csr -out my-server.cert -req -signkey my-server.key -days 365
echo .
echo Skopiuj do apache/conf/ssl pliki my-server.key oraz my-server.cert
pause

-----------------------Zapisz to jako plik bat - ułatwi życie

2. Configuring Apache and mod_ssl
Open the httpd.conf file and locate the LoadModule directives. 
Add LoadModule ssl_module modules/mod_ssl.so 

After </IfModule> add
SSLMutex default
SSLRandomSeed startup builtin
SSLSessionCache none
 
In the VirtualHost directives add
<VirtualHost www.my-domain.com:443>
SSLEngine On
SSLCertificateFile conf/ssl/my-server.cert
SSLCertificateKeyFile conf/ssl/my-server.key
</VirtualHost>


Open the ssl.conf file and set the correct www.my-domain.com and DocumentRoot. You will place the location of the secure material in the " " after DocumentRoot. So if your secure webpages are on your D: drive, in the folder called secure, the line should look like DocumentRoot "D:/secure"

Darmowe certyfikaty SSL potwierdzone przez centra cerrtyfikujace:
Start SSL i InstantSSL by Comodo
Instrukcja instalacji Start SSL http://www.makeuseof.com/tag/free-ssl-certificate/
Niestety trzeba byc wlascielem domenki.

Brak komentarzy:

Prześlij komentarz