How do I turn on SSL for test server?

Solution 1:

/etc/apache2/sites-available/default-ssl has the configuration for an http server. It can be enabled with the command sudo a2ensite default-ssl.

You will also need to enable mod ssl. This can be done with the command sudo a2enmod ssl. This will point you to /usr/share/doc/apache2.2-common/README.Debian.gz for directions on configuring SSL and generting a self-signed certificate. it can be viewed with the command zless /usr/share/doc/apache2.2-common/README.Debian.gz

Once you have the certificates installed, you can restart apache with the command sudo /etc/init.d/apache2 restart.

Solution 2:

You can add it within apache or add it with a proxy (like nginx). I prefer setting up an SSL proxy locally or remotely in the first place. This way if I need to install a WAF or IDS later, there are less modifications required.