httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leif W" <>
Subject Re: [users@httpd] Apache 2 SSL Problem
Date Thu, 09 Oct 2003 18:54:21 GMT
----- Original Message ----- 
From: "suomi" <>
To: <>
Sent: Thursday, October 09, 2003 1:41 PM
Subject: Re: [users@httpd] Apache 2 SSL Problem

> Regarding your first problem there you present to little info to say
> anything.
> regarding the CA certificate:
> you present poor apache a CA certificate, which you should not.
>  create a simple certificate based on this CA certificate and configure
> this certificate to apache.
> howto create a certificate:
> man openssl

Just to elaborate, here's some basic steps to follow to make a self-signed
certificate for testing purposes only:

1) mkdir ssl; chown root.root ssl; chmod 700 ssl; cd ssl

Make a protected, root owned ssl directory to hold your KEY, CSR, and CRT

2) openssl genrsa -des3 1024 >

Make the key.  If you're going to get a real certificate, then this file is
very important.  Do not lose.  Do not let it fall into wrong hands, etc..
Doing so will at the least cost you a new certificate, and at most all the
data protected by this certificate/key pair.  Note about the -des3 option:
specifying this option allows you to further encrypt the key with a pass
phrase.  This has the advantage of more protection, in the event the key
file is stolen, it is still protected.  This has the disadvantage, that
every time you start the server (i.e. during bootup, "apachectl startssl"),
you have to physically be at the computer console and enter the pass phrase
for each and every certificate.  To my knowledge there is no way to specify
the credentials programattically, due to further security concerns (extreme

3) openssl req -new -key >

Create the Certificate Signing Request (CSR).  The Common Name (CN)
specified here must match the address of the server exactly, ( and are two different things).

4) openssl req -x509 -days 30 -key -in >

Self-sign your certificate as if you were a Certificate Authority (CA).
This is the one-liner you pay all that money for.  Adjust the -days options

5) chown root.root *; chmod 400 *

Further protect your KEY, CSR, and CRT files.

Hope this helps,


> suomi
> Peter Fleck wrote:
> > [Followup thread to "Apache 2 VirtualHost and SSL" with new corrected
> > info. I've tried to get more specific in asking for help.]
> >
> > I'm looking for help in serving pages via SSL.
> >
> > I'm using Apache 2.x running on Linux 9. Using name-based virtual
> > hosting and understand I can only have a single SSL virtual host.
> >
> > SSL is working and the server is listening on port 443. I've confirmed
> > this with the curl tool and with netstat. The curl tool actually
> > returns my index page.
> >
> > curl also generates log entries in "ssl_access_log" and
> > "ssl_request_log."
> >
> > But if I try to access the server with a browser, using an "https"
> > url, the connection is refused and nothing is logged.
> >
> > Here's a brief summary of my setup. The port 80 sites are serving with
> > no problem.
> >
> > Main/default ServerName designation is This is
> > also listed as ServerName for one of the virtual sites. AND it's the
> > ServerName for the secure virtual site. Could this cause a problem.
> >
> > I do have "NameVirtualHost" and then list the
> > Virtual sites using IPs and ports as suggested on this list. So two
> > VirtualHosts are with two different ServerNames and
> > the third is with the ''
> > ServerName specified.
> >
> > One more thing, when I restart Apache, the following error is
> > generated in "ssl_error_log." Since I generated my own certificate and
> > key for testing, I thought it might have to do with that.
> >
> > [warn] RSA server certificate is a CA certificate (BasicConstraints:
> > CA == TRUE !?)
> >
> > Thanks.
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:> for more info.
> To unsubscribe, e-mail:
>    "   from the digest:
> For additional commands, e-mail:

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message