Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
$ a2enmod dav dav_fs dav_lock # Enable DAV
$ mkdir /path/to/www/dav      # Create directory for DAV
$ chown www-data:wwwdata /path/to/www/dav

$ a2enmod ssl                 # Enable SSL
$ a2ensite default-ssl        # Enable SSL site
RHEL
  1. yum install httpd mod_ssl
  2. vim /etc/httpd/conf/httpd.conf (and change ServerName)
  3. mkdir /etc/httpd/ssl/
  4. generate self-signed key to /etc/httpd/ssl
  5. vim /etc/httpd/conf.d/ssl.conf
  6. service httpd start
  7. chkconfig httpd on
SSL Setup

Setup the SSL site (on debian /etc/apache2/sites-available/default-ssl, redhat: /etc/httpd/conf.d/ssl.conf) to use the relevant keys and certificates (see Create self signed certificate):

...

SSLCACertificateFile is a concatenation of client certificates in PEM format.And

DAV

...

Setup
Code Block
        <Location /dav>
                Dav On
        </Location>

...

No Format
# For HTTPS servers remember to put the

# server FQDN in the CN.

KEY="$CN.key"
CSR="$CN.csr"
CRT="$CN.crt"

# Generate key
openssl genrsa -out "$KEY" 1024 || exit 1

# Certificate Signing Request (Remember to modify the signing request subject)
openssl req -new -key "$KEY" -out "$CSR" -subj "/C=DK/O=TestOrganization/OU=TestDepartment/CN=$CN" || exit 1

# Self sign
openssl x509 -req -days 1000 -in "$CSR" -out "$CRT" -signkey "$KEY" || exit 1

...

No Format
pkcs12 -export -in browser.crt -inkey browser.key -out browser.p12 -certfile /path/to/server.crt 

See also Using SSL in Java

...