Gandi Docs

 |   AAA  |    fr   en  

You are on a question's page

Managing your servers
answered

Question "SSL certificate", by Taha S.

Hello ,

I have accessed the phpmyadmin and I have saw that the Connection is not SSL not secure . is there any possibility to install SSL certificate in the server and how? thanks .

Answer, by Anssi V.

I'm assuming that you have some versions of apache as your web server. You could set up a self-signed certificate (google for "self signed ssl apache" or something) but more likely you will want to get an "official" certificate from some Certificate Authority.

An organization called CAcert had made the process of obtaining certificates extremely easy (maybe even easier than installing a self-signed one), and at a very affordable price - that is, free. The downside with CAcert is that it is still not yet recognized by default by most major browsers (it is striving for it all the time). There are some other organizations and companies that also provide somewhat affordable certificates, but here I'm going to focus on how to get a CAcert certificate, because I feel it is a project worth supporting.

To install a CAcert certificate: First, make sure your installation has all the necessary components (OpenSSL, mod_ssl etc). Then, all you need to do is to follow instructions in this URL: http://wiki.cacert.org/wiki/VhostsApache Basically, just download the script, run it, register yourself and your domain in http://cacert.org, request the certificate (using the information from the script), install the certificate and your key to proper location. The instructions focus on setting up a common certificate for multiple name-based virtual hosts, but it works equally well if you just have one website (just skip the SubjectAltNames part when running the script).

It's important to specify the port number for NameVirtualHost entry/entries in httpd.conf, e.g.

NameVirtualHost 000.000.000.000:443

where 000.000.000.000 is your ip. Then all you need to do is to create a proper virtualhost entry, something along the lines

<VirtualHost 000.000.000.000:443>
  ServerName my.server:443
  UseCanonicalName On
  SSLEngine on
  SSLCertificateFile /etc/pki/tls/certs/my.crt
  SSLCertificateKeyFile /etc/pki/tls/private/my.key
  SSLCipherSuite HIGH
  SSLProtocol all -SSLv2
  DocumentRoot "/path/to/my.server_document_root"
  <Directory "/path/to/my.server_document_root">
    Options -Indexes
    AllowOverride None
    Order allow,deny
    Allow from all
    SSLRequireSSL
  </Directory>
</VirtualHost>

If you have just one website/domain, and do not want to mess with virtual hosts, the instructions in URL http://wiki.cacert.org/wiki/SimpleApacheCert might be more suitable, but the script given in the above URL works fine in that case too.

Follow-up, by Josh T.

You might also try StartCom SSL. They offer a free SSL certificate which works in all major browsers other than Internet Explorer. That may prove sufficient for your purposes, particularly if you only want https to administrate your own website, and not for the general public to use.

I don't know of any free certificate provider whose certificates work in Internet Explorer without further configuration or scary security dialogs. If you want an SSL certificate that works in all browsers including IE, you'll have to pay for it.

Last modified: 17 Jul 2008 at 20:48 by Josh T.