Contao-Camp 2024
Ergebnis 1 bis 14 von 14

Thema: Fehler: Your installation is not secure. Please set the document root to the /web

  1. #1
    Contao-Nutzer
    Registriert seit
    31.03.2020.
    Beiträge
    25

    Standard Fehler: Your installation is not secure. Please set the document root to the /web

    Hallo,

    die Website ist online, Front- und Backend funktionieren, aber

    ich habe in unregelmäßigen Abständen (aber nicht jeden Tag) eine Fehlermeldung

    in der Kurzfassung:

    Code:
    Your installation is not secure. Please set the document root to the /web subfolder.
    In der Langfassung

    Code:
    [2021-11-16 03:26:22] request.INFO: Matched route "tl_page.80.root". {"route":"tl_page.80.root","route_parameters":{"_token_check":true,"_controller":"Contao\\FrontendIndex::renderPage","_scope":"frontend","_locale":"de","pageModel":"[object] (Contao\\PageModel: {})","_route":"tl_page.80.root"},"request_uri":"https://www.meineseite.de/index%2Ephp/","method":"GET"} []
    [2021-11-16 03:26:22] security.INFO: Populated the TokenStorage with an anonymous Token. [] []
    [2021-11-16 03:26:22] request.CRITICAL: Uncaught PHP Exception Contao\CoreBundle\Exception\InternalServerErrorHttpException: "Your installation is not secure. Please set the document root to the /web subfolder." at /var/www/clients/client3/web352/web/web/v1/vendor/contao/core-bundle/src/EventListener/ExceptionConverterListener.php line 94 {"exception":"[object] (Contao\\CoreBundle\\Exception\\InternalServerErrorHttpException(code: 0): Your installation is not secure. Please set the document root to the /web subfolder. at /var/www/clients/client3/web352/web/web/v1/vendor/contao/core-bundle/src/EventListener/ExceptionConverterListener.php:94, Contao\\CoreBundle\\Exception\\InsecureInstallationException(code: 0): Your installation is not secure. Please set the document root to the /web subfolder. at /var/www/clients/client3/web352/web/web/v1/vendor/contao/core-bundle/src/EventListener/InsecureInstallationListener.php:42)"} []
    [2021-11-16 03:26:22] request.CRITICAL: Exception thrown when handling an exception (Contao\CoreBundle\Exception\InsecureInstallationException: Your installation is not secure. Please set the document root to the /web subfolder. at /var/www/clients/client3/web352/web/web/v1/vendor/contao/core-bundle/src/EventListener/InsecureInstallationListener.php line 42) {"exception":"[object] (Contao\\CoreBundle\\Exception\\InsecureInstallationException(code: 0): Your installation is not secure. Please set the document root to the /web subfolder. at /var/www/clients/client3/web352/web/web/v1/vendor/contao/core-bundle/src/EventListener/InsecureInstallationListener.php:42)"} []
    [2021-11-16 03:26:22] request.CRITICAL: Uncaught PHP Exception Contao\CoreBundle\Exception\InternalServerErrorHttpException: "Your installation is not secure. Please set the document root to the /web subfolder." at /var/www/clients/client3/web352/web/web/v1/vendor/contao/core-bundle/src/EventListener/ExceptionConverterListener.php line 94 {"exception":"[object] (Contao\\CoreBundle\\Exception\\InternalServerErrorHttpException(code: 0): Your installation is not secure. Please set the document root to the /web subfolder. at /var/www/clients/client3/web352/web/web/v1/vendor/contao/core-bundle/src/EventListener/ExceptionConverterListener.php:94, Contao\\CoreBundle\\Exception\\InsecureInstallationException(code: 0): Your installation is not secure. Please set the document root to the /web subfolder. at /var/www/clients/client3/web352/web/web/v1/vendor/contao/core-bundle/src/EventListener/InsecureInstallationListener.php:42, Contao\\CoreBundle\\Exception\\InternalServerErrorHttpException(code: 0): Your installation is not secure. Please set the document root to the /web subfolder. at /var/www/clients/client3/web352/web/web/v1/vendor/contao/core-bundle/src/EventListener/ExceptionConverterListener.php:94, Contao\\CoreBundle\\Exception\\InsecureInstallationException(code: 0): Your installation is not secure. Please set the document root to the /web subfolder. at /var/www/clients/client3/web352/web/web/v1/vendor/contao/core-bundle/src/EventListener/InsecureInstallationListener.php:42)"} []
    Da es eine nginx Server ist, ist die Struktur mit doppeltem "web"

    Code:
    /var/www/clients/client3/web352/web/web/c1/web
    PHP open_basedir gesetzt auf

    Code:
    /var/www/clients/client3/web352/web/web/v1:/var/www/clients/client3/web352/web/web/v1/web:.....
    Woran kann das liegen? Was erzeugt die Fehlermeldung?

    Viele Grüße, Meike

  2. #2
    Community-Moderator
    Wandelndes Contao-Lexikon
    Avatar von Spooky
    Registriert seit
    12.04.2012.
    Ort
    Scotland
    Beiträge
    34.058
    Partner-ID
    10107

    Standard

    Zitat Zitat von meike_h Beitrag anzeigen
    Da es eine nginx Server ist, ist die Struktur mit doppeltem "web"
    Das hat nichts mit dem nginx zu tun. Bei voller Kontrolle über den Web Server könnt ihr völlig frei entscheiden, wo der root liegen soll. nginx gibt keinen "web" Ordner vor (aber euer Hoster macht das vielleicht).



    Zitat Zitat von meike_h Beitrag anzeigen
    PHP open_basedir gesetzt auf
    open_basedir solltet ihr entfernen: https://docs.contao.org/manual/de/pe...realpath-cache
    » sponsor me via GitHub or PayPal or Revolut

  3. #3
    Contao-Nutzer
    Registriert seit
    31.03.2020.
    Beiträge
    25

    Standard

    Hi Spooky,

    Leider wird open_basedir auch heute noch von vielen Hostern als notwendige Sicherheitsmassnahme angesehen
    da gehört unserer wohl leider auch dazu ;(

    Aber diese Fehlermeldung ...

    Warum "Your installation is not secure." ?

    "Please set the document root to the /web subfolder." Das ist ja erfüllt, sonst könnte das contao incl. Manager ja gar nicht aufgerufen werden ...
    Die Manager Systemprüfung läuft ohne Probleme durch.

  4. #4
    Wandelndes Contao-Lexikon Avatar von tab
    Registriert seit
    22.10.2013.
    Beiträge
    10.076
    Contao-Projekt unterstützen

    Support Contao

    Standard

    Das heißt, Du kannst dein Front- und Backend aufrufen ohne das web-Unterverzeichnis in der URL zu haben? Und Du kannst es nicht aufrufen, wenn du /web mit in der URL angibst?

  5. #5
    Contao-Nutzer
    Registriert seit
    31.03.2020.
    Beiträge
    25

    Standard

    Ja, ich kann alles ganz normal aufrufen per meinedomain.de und meinedomain.de/contao

    Ich wundere mich nur über diese merkwürdige Fehlermeldung, dass die Installation unsafe wäre ...

  6. #6
    Community-Moderator
    Wandelndes Contao-Lexikon
    Avatar von Spooky
    Registriert seit
    12.04.2012.
    Ort
    Scotland
    Beiträge
    34.058
    Partner-ID
    10107

    Standard

    Die Frage ist, ob auch meinedomain.de/web/index.php funktioniert. Oder irgendeinanderedomain.de/web/index.php

    Poste mal die richtige Domain, dann kann man das besser analysieren.
    » sponsor me via GitHub or PayPal or Revolut

  7. #7
    Contao-Nutzer
    Registriert seit
    31.03.2020.
    Beiträge
    25

    Standard

    Sollte das funktionieren? Soll man damit die Seite aufrufen können?

    das gibt einen 404-Fehler ... genau wie bei contao.org/web/index.php und vielen anderen, bei denen ich das getestet habe ...

    Die echte Domain ist https://www.schroeder-gas.de/
    Geändert von meike_h (19.11.2021 um 11:14 Uhr)

  8. #8
    Contao-Nutzer
    Registriert seit
    31.03.2020.
    Beiträge
    25

    Standard

    Kann hierzu noch jemand einen Tipp / eine Erklärung geben?

    Habe wieder (diesmal morgens um kurz vor sieben) den Fehler

    Code:
    "Your installation is not secure. Please set the document root to the /web subfolder."
    im Log.

    Nur ein mal morgens, keine weiteren Meldungen im var/log bis jetzt.

  9. #9
    Community-Moderator
    Wandelndes Contao-Lexikon
    Avatar von Spooky
    Registriert seit
    12.04.2012.
    Ort
    Scotland
    Beiträge
    34.058
    Partner-ID
    10107

    Standard

    Prüfe mal deine Access Logs und korreliere beide Einträge.
    » sponsor me via GitHub or PayPal or Revolut

  10. #10
    Contao-Nutzer
    Registriert seit
    31.03.2020.
    Beiträge
    25

    Standard

    hmm, nichts genau zur Uhrzeit:

    Code:
    136.243.83.42 - - [23/Nov/2021:06:21:47 +0100] "GET / HTTP/1.1" 301 162 "-" "Mozilla/5.0 (compatible; MetaJobBot; https://www.metajob.de/crawler)"
    157.55.39.80 - - [23/Nov/2021:06:52:14 +0100] "GET / HTTP/2.0" 301 162 "-" "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)"
    136.243.83.42 - - [23/Nov/2021:07:00:55 +0100] "GET /robots.txt HTTP/1.1" 301 162 "-" "Mozilla/5.0 (compatible; MetaJobBot; https://www.metajob.de/crawler)"
    im contao System-Log war zu der Zeit auch niemand aktiv

  11. #11
    Community-Moderator
    Wandelndes Contao-Lexikon
    Avatar von Spooky
    Registriert seit
    12.04.2012.
    Ort
    Scotland
    Beiträge
    34.058
    Partner-ID
    10107

    Standard

    Du könntest temporär Zeile 42 in vendor/contao/core-bundle/src/EventListener/InsecureInstallationListener.php auf
    PHP-Code:
    throw new InsecureInstallationException('Your installation is not secure. Please set the document root to the /web subfolder. '.$request->getUri()); 
    ändern und dann wieder warten, bis der Fehler auftritt. Dann steht die URL im Log.
    » sponsor me via GitHub or PayPal or Revolut

  12. #12
    Contao-Nutzer
    Registriert seit
    31.03.2020.
    Beiträge
    25

    Standard

    danke!
    Die Zeile ist geändert, mal sehen wer in die Falle geht ...
    Geändert von meike_h (23.11.2021 um 16:04 Uhr)

  13. #13
    Contao-Nutzer
    Registriert seit
    31.03.2020.
    Beiträge
    25

    Standard

    Hallo,

    habe jetzt mal wieder eine Fehlermeldung erhalten.

    Es geht immer um ein index%2Ephp, was ja zu index.php wird.

    Wo könnte da etwas falsch konfiguriert sein?

    Code:
    [2021-11-30 12:49:26] request.CRITICAL: Exception thrown when handling an exception (Contao\CoreBundle\Exception\InsecureInstallationException: Your installation is not secure. Please set the document root to the /web subfolder.https://www.schroeder-gas.de/index%2Ephp/ at /var/www/clients/client3/web352/web/web/v1/vendor/contao/core-bundle/src/EventListener/InsecureInstallationListener.php line 44) {"exception":"[object] (Contao\\CoreBundle\\Exception\\InsecureInstallationException(code: 0): Your installation is not secure. Please set the document root to the /web subfolder.https://www.schroeder-gas.de/index%2Ephp/ at /var/www/clients/client3/web352/web/web/v1/vendor/contao/core-bundle/src/EventListener/InsecureInstallationListener.php:44)"} []
    [2021-11-30 12:49:26] request.CRITICAL: Uncaught PHP Exception Contao\CoreBundle\Exception\InternalServerErrorHttpException: "Your installation is not secure. Please set the document root to the /web subfolder.https://www.schroeder-gas.de/index%2Ephp/" at /var/www/clients/client3/web352/web/web/v1/vendor/contao/core-bundle/src/EventListener/ExceptionConverterListener.php line 94 {"exception":"[object] (Contao\\CoreBundle\\Exception\\InternalServerErrorHttpException(code: 0): Your installation is not secure. Please set the document root to the /web subfolder.https://www.schroeder-gas.de/index%2Ephp/ at /var/www/clients/client3/web352/web/web/v1/vendor/contao/core-bundle/src/EventListener/ExceptionConverterListener.php:94, Contao\\CoreBundle\\Exception\\InsecureInstallationException(code: 0): Your installation is not secure. Please set the document root to the /web subfolder.https://www.schroeder-gas.de/index%2Ephp/ at /var/www/clients/client3/web352/web/web/v1/vendor/contao/core-bundle/src/EventListener/InsecureInstallationListener.php:44, Contao\\CoreBundle\\Exception\\InternalServerErrorHttpException(code: 0): Your installation is not secure. Please set the document root to the /web subfolder.https://www.schroeder-gas.de/index%2Ephp/ at /var/www/clients/client3/web352/web/web/v1/vendor/contao/core-bundle/src/EventListener/ExceptionConverterListener.php:94, Contao\\CoreBundle\\Exception\\InsecureInstallationException(code: 0): Your installation is not secure. Please set the document root to the /web subfolder.https://www.schroeder-gas.de/index%2Ephp/ at /var/www/clients/client3/web352/web/web/v1/vendor/contao/core-bundle/src/EventListener/InsecureInstallationListener.php:44)"} []
    Gruß,
    Meike

  14. #14
    Community-Moderator
    Wandelndes Contao-Lexikon
    Avatar von Spooky
    Registriert seit
    12.04.2012.
    Ort
    Scotland
    Beiträge
    34.058
    Partner-ID
    10107

    Standard

    Ändere die Zeile nochmals auf
    PHP-Code:
    throw new InsecureInstallationException('Your installation is not secure. Please set the document root to the /web subfolder. '.$request->getUri().', basepath: "'.$request->getBasePath().'"'); 
    und warte dann wieder
    » sponsor me via GitHub or PayPal or Revolut

Aktive Benutzer

Aktive Benutzer

Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1)

Lesezeichen

Lesezeichen

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
  •