apache-ssl-exercises
apache-ssl-exercises
# mkdir /etc/ssl/localcerts
# cd /etc/ssl/localcerts
# mkdir apache
# cd apache
When you are prompted to enter the host name to use in the SSL
certificate enter:
pcX.ws.nsrc.org
# cd /etc/apache2/sites-available
# vi default-ssl
DocumentRoot /var/www
DocumentRoot /var/www/pcX.ws.nsrc.org
SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
SSLCertificateKeyFile /etc/ssl/private/ssl-cert-
snakeoil.key
SSLCertificateFile /etc/ssl/localcerts/apache/server.pem
SSLCertificateFile /etc/ssl/localcerts/apache/server.pem
Now save the file and exit, then we'll enable the Apache SSL
configuration.
# a2ensite default-ssl
# a2enmod ssl
https://pcX.ws.nsrc.org/
You can use the built-in OpenSSL command line tool to connect to
your web server and see information about
the SSL certificate in use. To do this do (as root or a regular
user):
# openssl s_client -connect pcX.ws.nsrc.org:443
And you will see information about the SSL Digital Certificate for
the site pcX.ws.nsrc.org. You should see
something like:
subject=/CN=pcX.ws.nsrc.org
issuer=/CN=pcX.ws.nsrc.org
---
No client certificate CA names sent
---
SSL handshake has read 1004 bytes and written 319 bytes
---
New, TLSv1/SSLv3, Cipher is DHE-RSA-AES256-SHA
Server public key is 1024 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
SSL-Session:
Protocol : TLSv1
Cipher : DHE-RSA-AES256-SHA
Session-ID:
18541F63DDD15E050A3C72ED9415CC9A00B7DCD0DC472919AE4E4B67E4D88837
Session-ID-ctx:
Master-Key:
20BC655CCF5BC3D3BECD1D04333F928CB1A756871E5ACBD94455DD324E7E62BE29D1
1664AFDD61257DB71CBE1B4A7FEE
Key-Arg : None
Start Time: 1334826634
Timeout : 300 (sec)
Verify return code: 18 (self signed certificate)
---
closed