Get your own certificate

2017-11-03: This is not needed if you are using any of our  VMs as the Let’s Encrypt script handles the conf file generation.

You can get one on a TRIAL period of 3 months, and then extend for 4.95€ / year here.

Upload the certificate files to your server

Use Webmin to upload your files. Put the files in


You can find more info here.

Remember the location of the files as we will need that in the example_com.conf file later.

Become root in ubuntu
~:$ sudo -i
Activate SSL
~:$ a2enmod ssl
~:$ a2enmod headers
:~$ service apache2 restart
make a new conf file
~:$ nano /etc/apache2/sites-available/example_com.conf
Put this in the file you just made
<VirtualHost *:443>
    Header add Strict-Transport-Security: "max-age=15768000;includeSubdomains"
    SSLEngine on

     ServerAdmin [email protected]

### SETTINGS ###
    DocumentRoot /var/www/path-to-your-website-folder

    <Directory /var/www/path-to-your-website-folder>
    Options Indexes FollowSymLinks
    AllowOverride All
    Require all granted
    Satisfy Any 

    Alias /owncloud "/var/www/path-to-your-website-folder/"

    <IfModule mod_dav.c>
    Dav off

    SetEnv HOME /var/www/path-to-your-website-folder
    SetEnv HTTP_HOME /var/www/path-to-your-website-folder

    SSLCertificateFile /etc/ssl/ 
    SSLCertificateKeyFile /etc/ssl/ 
    SSLCACertificateFile /etc/ssl/ 
    SSLCertificateChainFile /etc/crt/ 

### LOGS ###
   ErrorLog ${APACHE_LOG_DIR}/error.log 
   CustomLog ${APACHE_LOG_DIR}/access.log combined

After you have made this you need to enter the domain into
~:$ nano /etc/hosts
It should look something like this: localhost
# The following lines are desirable for IPv6 capable hosts

::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
Activate your new config
:~$ a2ensite example_com.conf
:~$ sudo service apache2 reload
Deactivate your default-ssl config
:~$ a2dissite default-ssl.conf
:~$ sudo service apache2 reload

That’s all!


Secure your ownCloud against brute-force attempts. Configure Fail2ban!