Halaman

Tampilkan postingan dengan label SSL. Tampilkan semua postingan
Tampilkan postingan dengan label SSL. Tampilkan semua postingan

Kamis, 27 Februari 2014

Install GoDaddy SSL Certificate

In this tutorial I'll show you how you can install a GoDaddy SSL certificate.
This example was made with a GoDaddy certificate:
Generate certificate for GoDaddy:
#openssl genrsa -des3 -out www.fasttrack2marketing.com.key 2048
#openssl req -new -key www.fasttrack2marketing.com.key -out www.fasttrack2marketing.com.csr
Give to GoDaddy the contain of www.fasttrack2marketing.com.csr.
Then you'll recive a mail on the administrative contact of the domain mail address.
After that you'll recive from GoDaddy a zip file containing the cert, in our example fasttrack2marketing.com.crt.
If you set up a pass when you've created the cert file and you want to get rid of it here is how you can remove the pass:
#openssl rsa -passin pass:yourpass -in www.fasttrack2marketing.com.key -out www.fasttrack2marketing.com.key.nopass
#mv www.fasttrack2marketing.com.key.nopass www.fasttrack2marketing.com.key
Then place the key and crt file into /etc/pki/tls/cets dir:
#mv  fasttrack2marketing.com.crt /etc/pki/tls/certs/
#mv  www.fasttrack2marketing.com.key /etc/pki/tls/certs/
Make sure that nobody other then root can access those files:
#chmod 0600 /etc/pki/tls/certs/fasttrack2marketing.com.crt
#chmod 0600 /etc/pki/tls/certs/www.fasttrack2marketing.com.key
Configuring apache:
Install mod_ssl for apache:
#yum install mod_ssl
Edit /etc/httpd/conf.d/ssl.conf according to this:
#SSLCertificateFile /etc/pki/tls/certs/localhost.crt 
SSLCertificateFile /etc/pki/tls/certs/fasttrack2marketing.com.crt
#SSLCertificateKeyFile /etc/pki/tls/private/localhost.key 
SSLCertificateKeyFile /etc/pki/tls/certs/www.fasttrack2marketing.com.key
Add document root wich should contain the dir where your webfiles are stored:
DocumentRoot /virtual/web/sites/shared/www.fasttrack2marketing.com/html
Add Directory wich should contain path to your web files: 
<Directory "/virtual/web/sites/shared/www.fasttrack2marketing.com/html">
Options Indexes FollowSymLinks 
AllowOverride All 
Order allow,deny 
Allow from all
</Directory>
Then restart the apache:
#/etc/init.d/httpd restart
Next you need to force http request to https. In order to do that create a .htaccess file inside your web dir containing: 
RewriteEngine on
RewriteCond %{SERVER_PORT} =80
RewriteRule ^(.*) https://%{SERVER_NAME}%{REQUEST_URI}
That's it! Goodluck!

Source : http://www.linuxexpert.ro/Linux-Tutorials/install-godaddy-ssl-certificate.html