|
|
Installing your Certificate on Apache Mod_SSLStep 1: Copy your certificate to fileYou will receive an email from Networking4all with the certificate in the email (yourdomainname.crt). When viewed in a text editor, your certificate will look something like: -----BEGIN CERTIFICATE----- Copy your SSL Certificate into the directory that you will be using to hold your certificates. In this example we will use /home/user/site/ssl/. The private key used in the example will be labeled private.key and the public key will be public.crt. It is recommended that you make the directory that contains the private key file only readable by root. Step 2: Configuring the Web serverTo activate your SSL Certificate add the following line in the configuration (httpd.conf) in a <VirtualHost> specification. SSLEngine on SSLCertificateFile /file-location/public.crt (yourdomain-com.crt) SSLCACertificateFile /file-location/intermediates.crt SSLCertificateKeyFile /file-location/private.key Save your httpd.conf file and restart Apache. Force a secure https connectionIf you want to force a secure https connection for your website or a specific directory on your website you could place the following code in a .htaccess file on your server.
RewriteEngine on
RewriteCond %{SERVER_PORT} ^80$
RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||