Monday, February 13, 2012

Enabling SSL on Apache2 for Testing

Enabling SSL on an apache2 installation is easy. There are plenty of instructions on the Web for doing this, but I thought I'd describe the way to do it using the latest Ubuntu installation of apache2, which is idiosyncratic.

First you need to generate a self-signed certificate. I used the following command:

openssl req -new -x509 -nodes -out server.crt -keyout server.key

Now create a directory for these files inside your apache2 installation:

sudo mkdir /etc/apache2/certs/

And move the certificates to that location:

sudo mv server.* /etc/apache2/certs/

Next, edit /etc/apache2/sites-available/default-ssl, and change the two directives:

And it should work. Test it by going to https://localhost in the browser. It should give you a dialog complaining about how insecure this is. Just say that you understand the risks, enable the exception, and it will take you to the index.html page.

No comments:

Post a Comment

This is a private blog about setting up and designing a Denial of Service Testing Framework (DOSTF). It consists of a set of C-tools for launching DDoS attacks and monitoring their effects on various platforms. The DDoS attack tools are only designed for experimental purposes and won't work outside of a laboratory. They are also not generally available.