Https connection returns ERR_SSL_PROTOCOL_ERROR

Support intro

Hello, I’m facing a problem since I changed my domain name. I have NextCloud on an Apache server. I can reach it via http both using my IP and the domain name. I issued an ssl certificate using certbot, but I keep getting ERR_SSL_PROTOCOL_ERROR.

Nextcloud version 15.0.6):
Operating system and versionarmbian:
Apache version Apache 2.4.29:
PHP version (eg, 7.1):

This is my nextcloud-le-ssl.conf
(Had to get rid of dots in links because of new users restrictions)

<IfModule mod_ssl.c>
<VirtualHost *:443>
     ServerAdmin admin@examplecom
     DocumentRoot /var/www/html/nextcloud/
     ServerAlias wwwmydomaincom
     Alias /nextcloud "/var/www/html/nextcloud/"

     <Directory /var/www/html/nextcloud/>
        Options +FollowSymlinks
        AllowOverride All
        Require all granted
          <IfModule mod_dav.c>
            Dav off
        SetEnv HOME /var/www/html/nextcloud
        SetEnv HTTP_HOME /var/www/html/nextcloud

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

Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/
SSLCertificateKeyFile /etc/letsencrypt/live/
<IfModule mod_ssl.c>
<VirtualHost *:80>
  ServerName wwwmydomaincom
  RewriteEngine On
# Some rewrite rules in this file were disabled on your HTTPS site,
# because they have the potential to create redirection loops.

# RewriteRule ^/?(.*) https://%{SERVER_NAME}:443/$1 [R,L]


That was created automatically. The certificates are in the right place.
Any advice?


This sounds like a general problem with your Apache2 configuration and not a Nextcloud problem. Please check the available information to get your problem fixed:

Thank for the reply. Do you think that part is the actual problem? It was larger just because I couldn’t figure out formatting, I fixed it now.
From my understanding that’s just automatic redirection of http to https. But I can’t get https to work at all.

I think you will find a lot of documents explaining how to set-up https for a virtual host on the internet too. I personally would try to use the fqdn of your server instead of “*” for the “<VirtualHost ...:443>” setting.

google “Mark down” and enclose code in three ```


 (before & after in a single line)

you may have a look at daniels script to setup nextcloud with apache. there you can find a working https config for apache2. i think.