Die .htaccess-Datei funktioniert nicht

Hallo Ich hab folgendes Problem.
Ich hab auf meinen Server heute NextCloud frisch installiert. Es läuft auch so weit alles. 'In den Einstellungen bekomme ich folgende Message:

Ihr Datenverzeichnis und Ihre Dateien sind wahrscheinlich vom Internet aus erreichbar. Die .htaccess-Datei funktioniert nicht. Es wird dringend empfohlen, Ihren Webserver dahingehend zu konfigurieren, dass das Datenverzeichnis nicht mehr vom Internet aus erreichbar ist oder dass Sie es aus dem Document-Root-Verzeichnis des Webservers herausverschieben.

Ich hab dann über Terminal nachgesehen, ob die htaccess vorhanden ist; ja ist sie. Aber bei den Inhalt bin ich mir nicht sicher:

#### DO NOT CHANGE ANYTHING ABOVE THIS LINE ####

ErrorDocument 403 //

ErrorDocument 404 //

Das ist alles, was in der htaccess steht, was ich ziemlich ungewöhnlich finde.

Das System:

  • Ubuntu 18.04 LTS
  • Apache 2
  • mySQL
  • PHP 7.2

die Rechte für das Verzeichnis liegt bei www-data.

Ich hab noch die zip Datei, in der auch die htaccess liegt. Kann ich einfach die server htaccess mi dem Inhalt von der zip htaccess überschreiben ?

Hallo Acht du… mein Lieblingsthema -.- egal das bekommen wie auch hin ^^

/etc/apache2/sites-enabled/
Welche dateien hast du da ?

Wo liegt deine NextCloud
in /var/www/NextCloud oder in /var/www/html/NextCloud ?

Danke für deine Antwort!

Ich hab mir virtuelle Host angelegt.
in /etc/apache2/sites-enabled/ sind folgende Verknüpfungen.

  • nexcloud.{domain}.de.conf
  • nextcloud.{domain}.de-le-ssl.conf

Ich hab den Server die SSL Zertifikate von Let’s Encrypt installiert. (Certbot)

Meine Files für die Nextcloud liegen in /var/www/nextcloud.{domain}.de/html.

Hinweis : ich hab meinen eigentliche Domain mit {domain} im Forum ausgetauscht.

DUMP: nexcloud.{domain}.de.conf

<VirtualHost *:80>
    ServerAdmin kai@{domain}.de
    ServerName nextcloud.{domain}.de
    DocumentRoot /var/www/nextcloud.{domain}.de/html
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

DUMP: nextcloud.{domain}.de-le-ssl.conf

    <IfModule mod_ssl.c>
<VirtualHost *:443>
    ServerAdmin kai@{domain}.de
    ServerName nextcloud.{domain}.de
    DocumentRoot /var/www/nextcloud.{domain}.de/html
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined



SSLCertificateFile /etc/letsencrypt/live/nextcloud.{domain}.de/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/nextcloud.{domain}.de/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
</IfModule>

Greets :slight_smile:

<VirtualHost *:80>
    ServerAdmin kai@{domain}.de
    ServerName nextcloud.{domain}.de
    DocumentRoot /var/www/nextcloud.{domain}.de/html
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
<Directory /var/www/>
       Options +FollowSymlinks
       AllowOverride All

      <IfModule mod_dav.c>
        Dav off
      </IfModule>

       SetEnv HOME /var/www
       SetEnv HTTP_HOME /var/www
     </Directory>

     <IfModule mod_headers.c>
          Header always set Strict-Transport-Security "max-age=15768000; preload"
     </IfModule>

und beim andern noch das SSLEngine on

    <IfModule mod_ssl.c>
<VirtualHost *:443>
    ServerAdmin kai@{domain}.de
    ServerName nextcloud.{domain}.de
    DocumentRoot /var/www/nextcloud.{domain}.de/html
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

SSLEngine on

SSLCertificateFile /etc/letsencrypt/live/nextcloud.{domain}.de/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/nextcloud.{domain}.de/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
</IfModule>

versuchs mal so

2 Likes

Sag mal hattest du keine Fehler bei dir drin stehen wegen ?

"max-age=15768000

Ja die Warnung hab ich auch bekommen (orange). Ich wollte erstmal die Roten Fehler beseitigen und nach und nach die anderen Warnungen abarbeiten.

Vielen Dank, der Fehler ist behoben :smile:

geht jetzt alles ? oder nur der fehler weg ^^

Alle Fehler sind behoben :slight_smile:

Vielen Dank für deine Hilfe.

Phu da haben wir glück gehabt :grin:

hatte schon angst das geht irgendwie in die hose :sweat_smile:

in dem fall aber viel spaß mit der cloud :+1:

1 Like