This documented is intended to get you started, and get a few things working. You are strongly encouraged to read the rest of the SSL documentation, and arrive at a deeper understanding of the material, before progressing to the advanced techniques.
Your SSL configuration will need to contain, at minimum, the following directives.
The following enables only the strongest ciphers:
While with the following configuration you specify a preference for specific speed-optimized ciphers (which will be selected by mod_ssl, provided that they are supported by the client):
Obviously, a server-wide Location
blocks, to give a per-directory solution, and can automatically force
a renegotiation of the SSL parameters to meet the new configuration.
This can be done as follows:
When you know all of your users (eg, as is often the case on a corporate
Intranet), you can require plain certificate authentication. All you
need to do is to create client certificates signed by your own CA
certificate (ca.crt) and then verify the clients against this
certificate.
To force clients to authenticate using certificates for a particular URL,
you can use the per-directory reconfiguration features of
The key to doing this is checking that part of the client certificate
matches what you expect. Usually this means checking all or part of the
Distinguished Name (DN), to see if it contains some known string.
There are two ways to do this, using either
The
The password used in this example is the DES encrypted string "password".
See the
/C=DE/L=Munich/O=Snake Oil, Ltd./OU=Staff/CN=Foo:xxj31ZMTZzkVA /C=US/L=S.F./O=Snake Oil, Ltd./OU=CA/CN=Bar:xxj31ZMTZzkVA /C=US/L=L.A./O=Snake Oil, Ltd./OU=Dev/CN=Quux:xxj31ZMTZzkVA
When your clients are all part of a common hierarchy, which is encoded
into the DN, you can match them more easily using
These examples presume that clients on the Intranet have IPs in the range
192.168.1.0/24, and that the part of the Intranet website you want to allow
internet access to is /usr/local/apache2/htdocs/subarea.
This configuration should remain outside of your HTTPS virtual host, so
that it applies to both HTTPS and HTTP.
info may already be too much. Remember that you can
configure the