Setting up a self signed SSL certificate with Apache

I’m assuming you have Apache installed.

Enable the SSL mod for apache:

Create a directory for the certificates:

Generate the certificate:

Openssl will ask for some information, make sure you set the FQDN properly, the rest don’t matter.

Now edit your virtualhost to point to port 443:

Add the port to the server name directive:

Then enable SSL and point the virtualhost at the certificates:

Save the file and restart Apache

Now if you want to redirect non-SSL requests to the SSL port add another virtualhost that looks like the following:

Then a2ensite the new virtualhost and restart Apache once more.

Apt can’t see sources? Try changing the User Agent

If you are trying to use apt behind a corporate firewall, try changing the user agent apt is using with wget to load the package lists. By default it uses:

which isn’t recognised by the filter.

1. Create and edit /etc/apt/apt.conf

2. Paste the following into the file:

3. Update apt