Tuesday, May 22, 2007

Use SSL in Apache 2.0

1. openssl genrsa -out www.mydomain.com.key 1024

2. openssl req -new -key www.mydomain.com.key -out www.mydomain.com.csr


3. openssl x509 -in www.mydomain.com.csr -out www.mydomain.com.crt -req -signkey www.mydomain.com.key -days 365

4.
cp www.mydomain.com.key /etc/httpd/conf/

5. cp www.mydomain.crt /etc/httpd/conf/


6. Apache 2.0 configuration:


NameVirtualHost *:443
<Virtualhost www.mydomain.com:443="">
DocumentRoot /var/www/html
SSLEngine on
SSLProxyEngine on
SSLCertificateFile conf/www.mydomain.com.crt
SSLCertificateKeyFile conf/www.mydomain.com.key
</virtualhost>

No comments: