First thing first, prerequisites:
yum install mod_ssl openssl nc -yNow for the certificates, note that 'Common Name' is the most important field, where you put your site's FQDN:
cd ~/
mkdir ssl
cd ssl
openssl genrsa -out server.key 1024
openssl req -new -key server.key -out server.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) [GB]:
State or Province Name (full name) [Berkshire]:
Locality Name (eg, city) [Newbury]:
Organization Name (eg, company) [My Company Ltd]:
Organizational Unit Name (eg, section) []:
Common Name (eg, your name or your server's hostname) []:
Email Address []:
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:
openssl x509 -req -days 3650 -in server.csr -signkey server.key -out server.crt
mkdir -p /etc/ssl/certs
mkdir -p /etc/ssl/private
sudo cp server.crt /etc/ssl/certs/self_signed.crt
sudo cp server.key /etc/ssl/private/self_signed.key
In apache:
SSLEngine on
SSLCertificateFile /etc/ssl/certs/self_signed.crt
SSLCertificateKeyFile /etc/ssl/private/self_signed.key
SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown
CustomLog logs/ssl_request_log \
"%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
No comments:
Post a Comment