URL-Pfad anpassen DocumentRoot & LetsEncrypt Domain ändern - Certbot

Hallo,

bevor ich verzweifle, dachte ich ich frage doch mal lieber nach, bevor ich meine NextCloud-Installation wieder zerschieße… :unamused:

Ich hab zwei Probleme:

  1. Die Installation soll über .duckdns.org und .duckdns.org/nextcloud erreichbar sein. Bisher ist nur letzteres der Fall.

  2. Ich möchte das LetsEncrypt-Zertifikat von der myfritz-Domain auf die .duckdns.org ändern/neu ausstellen (und das alte löschen)

Meine Versuche mit dem Certbot das alte Zertifikat zu löschen (sudo certbot delete) waren nicht von Erfolg gekrönt. Scheinbar muss ich an diese Dateien ran?

Inhalt von
/etc/apache2/sites-enabled/000-default-le-ssl.conf

<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
ServerName <alte Subdomain>.myfritz.net
SSLCertificateFile /etc/letsencrypt/live/<alte Subdomain>.myfritz.net/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/<alte Subdomain>.myfritz.net/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
</IfModule>
<IfModule mod_headers.c>
        Header always add Strict-Transport-Security "max-age=15552000; includeSubDomains; preload"
</IfModule>

Inhalt von
/etc/apache2/sites-enabled/000-default.conf

<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
RewriteEngine on
RewriteCond %{SERVER_NAME} =<alte Subdomain>.myfritz.net
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>

Betriebssystem: Raspian Buster auf Raspberry Pi 4B (Zuhause)
PHP-Version: 7.3
NextCloud-Version: 23