Apache2 SSL

1. Create a self-signed certificate: Apache2 comes with the script

Note: It seems not to be documented at all (manpage?), so try --force and --days if your certificate has expired!

2. Create a new server configuration under apache2/sites-available
Listen 443

NameVirtualHost *:443

<VirtualHost *:443>
LoadModule ssl_module /usr/lib/apache2/modules/mod_ssl.so

DocumentRoot /var/swww

SSLEngine on
SSLCertificateFile /etc/apache2/ssl/apache.pem

ErrorLog /var/log/apache2/ssl_error.log

3. Enable the new site
cd /etc/apache2/sites-enabled
ln -s ../sites-available/new-site-name

4. Restart apache2
/etc/init.d/apache2 restart

Comments: Post a Comment

<< Home

This page is powered by Blogger. Isn't yours?