Internal Server Error after creating Let's Encrypt Cert

I set up Letsencrypt on my Nextcloud today. Now I can’t reach my Nextcloud anymore.

Attached is the output after creating a certificate:

Running pre-hook command: service apache2 stop
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for mycloud.xxxxxx.at
http-01 challenge for nc.xxxxxx.at
Waiting for verification...
Cleaning up challenges
Running post-hook command: service apache2 start
Created an SSL vhost at /etc/apache2/sites-available/000-default-le-ssl.conf
Enabled Apache socache_shmcb module
Enabled Apache ssl module
Deploying Certificate to VirtualHost /etc/apache2/sites-available/000-default-le-ssl.conf
Enabling available site: /etc/apache2/sites-available/000-default-le-ssl.conf

We were unable to find a vhost with a ServerName or Address of nc.xxxxxx.at.
Which virtual host would you like to choose?
(note: conf files with multiple vhosts are not yet supported)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: 000-default.conf                 |                       |       | Enabled
2: 000-default-le-ssl.conf        | mycloud.xxxxxx.at     | HTTPS | Enabled
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 2
Deploying Certificate to VirtualHost /etc/apache2/sites-available/000-default-le-ssl.conf

Please choose whether or not to redirect HTTP traffic to HTTPS, removing HTTP access.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: No redirect - Make no further changes to the webserver configuration.
2: Redirect - Make all requests redirect to secure HTTPS access. Choose this for
new sites, or if you're confident your site works on HTTPS. You can undo this
change by editing your web server's configuration.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 2
Added an HTTP->HTTPS rewrite in addition to other RewriteRules; you may wish to check for overall consistency.
Redirecting vhost in /etc/apache2/sites-enabled/000-default.conf to ssl vhost in /etc/apache2/sites-available/000-default-le-ssl.conf

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Congratulations! You have successfully enabled https://mycloud.xxxxxx.at and
https://nc.xxxxxx.at

Here my 000-default-le-ssl.conf file:

<IfModule mod_ssl.c>
<VirtualHost *:443>
   ServerAdmin xxxxxx.xxxxxx@xxxxxx.at

   RewriteEngine On
 # Some rewrite rules in this file were disabled on your HTTPS site,
 # because they have the potential to create redirection loops.

 # RewriteCond %{HTTPS} off
 # RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [R=301,L]

   ServerName mycloud.xxxxxx.at
   Include /etc/letsencrypt/options-ssl-apache.conf
   ServerAlias nc.xxxxxx.at
   SSLCertificateFile /etc/letsencrypt/live/mycloud.sptech.at/fullchain.pem
   SSLCertificateKeyFile /etc/letsencrypt/live/mycloud.sptech.at/privkey.pem
</VirtualHost>
</IfModule>

Here my 000-default.conf:

<VirtualHost *:80>
   ServerAdmin xxxxxx.xxxxxx@xxxxxx.at

   RewriteEngine On
   RewriteCond %{HTTPS} off
   RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [R=301,L]

RewriteCond %{SERVER_NAME} =nc.xxxxxx.at [OR]
RewriteCond %{SERVER_NAME} =mycloud.xxxxxx.at
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>

Where has a mistake crept in?

have you tried loggin in with the ip-number of your instance?
plus: try https://your-domain.at:443

Hello JimmyKater,

I have internally the same problem with the IP. Until the installation of the certificate it worked with the IP and the domain.

When I try https://your-domain.at:443 I will be forwarded to https://mycloud.sptech.at/index.php.

Are you using redis-server and the redis-server is probably offline? Otherwise I can´t explain why you have an internal server error.

Did you also set the ServerName in the virtual host files? I know that this was the fault last time :wink:

my ssl.conf file looks different. and as i’m just relying upon it without really knowing i can’t really help you in what’s wrong and/or right.

i think at least it should contain a DocumentRoot like /etc/www/html or such

Above you can see both virtual host files from my installation. In “000-default-le-ssl.conf” the server name is added.