Select Page

Create Your own SSL certificate for Apache

Create a new RSA key

# openssl genrsa -des3 -out server.key 1024

Give a very lengthy key, and save it somewhere in a PGP file or TrueCrypt volume

Create a non encrypted version for Apache

# openssl rsa -in server.key -out server.key.unsecure

Prepare the mark inquiry

# openssl req -new -key server.key -out server.csr

Attention enter the host from where the certificate will be use, since browser are matching content of certificate with host url.

Sign the certificate

# openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt

Add the SSL certificate to Apache

Attention
path to server.key and server.crt may differ!

(SuSE 9.3 keys store at /etc/apache2/ssl.key/)

# cp server.key.unsecure /etc/httpd/ssl.key/server.key
# cp server.crt /etc/httpd/ssl.crt/server.crt
# chmod 400 /etc/httpd/ssl.key/server.key
# chmod 400 /etc/httpd/ssl.crt/server.crt

Restart Apache

BrutalGraceful

# /etc/init.d/apache restart

# apache2ctl gracefu
 
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments

Categories

0
Would love your thoughts, please comment.x
()
x