# openssl genrsa -out sklep2011.key 2048
Generating RSA private key, 2048 bit long modulus
…………………………………………………………………….+++
………………………………………………………………………………………………………………………………………………………………………+++
e is 65537 (0x10001)
Generowanie CSR:
# openssl req -new -key sklep2011.key -out sklep2011.csr
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter ‚.’, the field will be left blank.
—–
Country Name (2 letter code) [AU]:PL
State or Province Name (full name) [Some-State]:Wroclaw
Locality Name (eg, city) []:Wroclaw
Organization Name (eg, company) [Internet Widgits Pty Ltd]:Nazwa Firmy
Organizational Unit Name (eg, section) []:Cokolwiek
Common Name (eg, YOUR name) []:serwer.amsnet.pl
Email Address []:
Please enter the following ‚extra’ attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:
(opcjonalne elementy oraz adres email pozostawiamy puste).
Teraz przesyłamy otrzymany CSR (sklep2011.csr) poprzez stronę np. rapidssl.com, w celu autoryzacji, trzeba kliknąć w link w mailu na adres admin@_adres_ssl. Po otrzymaniu certyfikatu, należy go zapisać w pliku, np. sklep2011.crt oraz dodać do obsługi w apache2, czyli np.:
ServerAdmin spam@amsnet.pl
DocumentRoot /var/www/costam
ServerName serwer.amsnet.pl
ErrorLog /var/log/apache/sklep-error.log
CustomLog /var/log/apache/sklep-access.log combined
SSLEngine on
SSLCertificateFile /etc/ssl/2011/sklep2011.crt
SSLCertificateKeyFile /etc/ssl/2011/sklem2011.pem
SetEnvIf User-Agent „.*MSIE.*” nokeepalive ssl-unclean-shutdown