Difference between revisions of "Create SSL CA for Apache"

From Urandom
Jump to: navigation, search
(Created page with "== Generate keys and cert == This is how to make keys quickly, this wont have another third CA, so firefox and other browsers will go crazy, but who cares its good for testing. <…")
 
Line 2: Line 2:
 
This is how to make keys quickly, this wont have another third CA, so firefox and other browsers will go crazy, but who cares its good for testing.
 
This is how to make keys quickly, this wont have another third CA, so firefox and other browsers will go crazy, but who cares its good for testing.
 
<pre>
 
<pre>
openssl genrsa -out site.key 1024
+
openssl req -newkey rsa:2048 -x509 -sha256 -days 365 -nodes -out site.pem -keyout site.key
openssl req -new -key site.key -out site.csr
 
openssl x509 -in site.csr -out site.cert -req -signkey site.key -days 365
 
 
</pre>
 
</pre>
  
Line 11: Line 9:
 
In your SSL apache conf set these:
 
In your SSL apache conf set these:
 
<pre>
 
<pre>
SSLCertificateFile /path/to/certs/site.cert
+
SSLCertificateFile /path/to/certs/site.pem
 
SSLCertificateKeyFile /path/to/certs/site.key
 
SSLCertificateKeyFile /path/to/certs/site.key
 
</pre>
 
</pre>

Revision as of 18:06, 6 April 2015

Generate keys and cert

This is how to make keys quickly, this wont have another third CA, so firefox and other browsers will go crazy, but who cares its good for testing.

openssl req -newkey rsa:2048 -x509 -sha256 -days 365 -nodes -out site.pem -keyout site.key


Configure apache

In your SSL apache conf set these:

SSLCertificateFile /path/to/certs/site.pem
SSLCertificateKeyFile /path/to/certs/site.key