Enable https on Apache 2

How can I enable https on an apache 2 server? By default it is not enabled.
2 answers

Solution for "Connect to a Postgresql database and select or edit data through R"

    1. download and install the odbc driver for the postgresql database on your client from http://www.postgresql.org/ftp/odbc/versions/. The msi directory is for windows users and the src directory for *nix users.
    2. set up a odbc dsn entry on the client computer. Here is a link for windows users http://support.microsoft.com/kb/305599. And here is a link for ubuntu users https://help.ubuntu.com/community/ODBC
    3. Install RODBC for R. RODBC is a library which provides the necessary functions to connect to a database and modify data.

    install.packages("RODBC");
    4. Connecting to a odbc dsn entry is quite simple:

    channel <- odbcConnect("odbc_dns_entry_name");
    5. Insert Data as SQL Statement:

    odbcQuery(channel,"insert ...");
    6. Selecting data from a table:

    sqlFetch(channel, "table_name");

Further information of the RODBC functionalities could be found here

Taggings:

Solution for "Enable https on Apache 2"

    1. make a self signed certificate with the command:

    apache2-ssl-certificate
    2. enables the ssl mode for apache 2:

    a2enmod ssl
    3. Add the following line to ports.conf (probably located at /etc/apache2/ports.conf)

    Listen 443
    4. Add the following lines to the virtual hosts file. (Change the location of the ssl certificate file if necessary.)

    ServerName earth.my.flat

    DocumentRoot /var/www/
    ErrorLog /var/log/apache2/error.log
    CustomLog /var/log/apache2/access.log combined

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


http://www.debian-administration.org/articles/349