Setting up HTTPS with Apache using a CAcert certificate

openssl req -new -nodes -out -keyout
# Type your domain name to the Common Name field.

# Log in to CAcert, go to Server Certificates > New, select “Sign by class 3 root certificate”, hand the CSR and get the CRT which you should place to your server as /etc/apache2/ssl/

cat << END > /etc/apache2/sites-available/
NameVirtualHost *:443
<VirtualHost *:443>
DocumentRoot /var/www
Options FollowSymLinks
SSLEngine on
SSLCertificateFile /etc/apache2/ssl/
SSLCertificateKeyFile /etc/apache2/ssl/

a2enmod ssl
apache2ctl restart


Leave a Reply

Your email address will not be published.