Ergebnis 1 bis 7 von 7

Thema: Seit https-Zertifikat aktiviert, Login im Backend nicht möglich

  1. #1
    Contao-Nutzer
    Registriert seit
    17.06.2011.
    Beiträge
    52

    Standard Seit https-Zertifikat aktiviert, Login im Backend nicht möglich

    Hallo liebe Community,
    ich benötige ein paar Lösungsansätze.

    Seitdem das https-Zertifikat aktiviert wurde, schlägt der Login im Backend fehlt.
    Mit Glück kommt man ab und an rein, sobald man sich durch Klick bewegt, wird man wieder rausgeworfen und landet in der Login-Maske.
    Contao wirft keine Fehler. Man kommt auch auf das Installtool - auch darüber kann man sich mal im Backend anmelden und kommt bis zum nächsten Klick, mal schlägt es direkt fehl.

    Die .htaccess haben wir mittels dieser Anleitung angepasst. An irgendeiner Stelle scheint sie aber "überschrieben" zu werden?

    Die Seite liegt auf einem 1und1-Server (Cloud Hosting L) - hier habe ich selbst leider keinen Zugriff. Die IT des Kunden hat das Zertifikat direkt über 1und1 aktiviert.

    A) Was kann ich selbst versuchen, um das Problem zu lösen, oder was habe ich evtl. noch vergessen anzupassen? oder
    B) Welche Fragen muss ich gegebenenfalls an die IT des Kunden stellen?

    Vielen Dank schon einmal für eure Hilfe

    // ich bin aus Versehen in der falschen Kategorie gelandet - bitte einen Mod eben um Verschiebung
    Geändert von limonen-zebra (27.03.2018 um 09:07 Uhr)

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

    Standard

    Lösche deine Cookies und poste deine .htaccess

  3. #3
    Contao-Nutzer
    Registriert seit
    17.06.2011.
    Beiträge
    52

    Standard

    Code:
    <IfModule mod_headers.c>
        # Allow access from all domains for webfonts (see contao/core-bundle#528)
        <FilesMatch "\.(ttf|ttc|otf|eot|woff2?|font\.css)$">
            Header set Access-Control-Allow-Origin "*"
        </FilesMatch>
    </IfModule>
    
    <IfModule mod_rewrite.c>
        RewriteEngine On
    
    
        # Determine the RewriteBase automatically and set it as environment variable.
        # If you are using Apache aliases to do mass virtual hosting or installed the
        # project in a subdirectory, the base path will be prepended to allow proper
        # resolution of the app.php file and to redirect to the correct URI. It will
        # work in environments without path prefix as well, providing a safe, one-size
        # fits all solution. But as you do not need it in this case, you can comment
        # the following 2 lines to eliminate the overhead.
        RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$
        RewriteRule ^(.*) - [E=BASE:%1]
    
        # Sets the HTTP_AUTHORIZATION header removed by Apache
        RewriteCond %{HTTP:Authorization} .
        RewriteRule ^ - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    
        # Redirect to URI without front controller to prevent duplicate content
        # (with and without `/app.php`). Only do this redirect on the initial
        # rewrite by Apache and not on subsequent cycles. Otherwise we would get an
        # endless redirect loop (request -> rewrite to front controller ->
        # redirect -> request -> ...).
        # So in case you get a "too many redirects" error or you always get redirected
        # to the start page because your Apache does not expose the REDIRECT_STATUS
        # environment variable, you have 2 choices:
        # - disable this feature by commenting the following 2 lines or
        # - use Apache >= 2.3.9 and replace all L flags by END flags and remove the
        #   following RewriteCond (best solution)
        RewriteCond %{ENV:REDIRECT_STATUS} ^$
        RewriteRule ^app\.php(?:/(.*)|$) %{ENV:BASE}/$1 [R=301,L]
    
        # If the requested filename exists, simply serve it.
        # We only want to let Apache serve files and not directories.
        RewriteCond %{REQUEST_FILENAME} -f
        RewriteRule ^ - [L]
    
    	# Versuch Nr1. klappt nicht
        # 
        # RewriteCond %{HTTPS} !=on 
        # RewriteCond %{ENV:HTTPS} !=on 
        # RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L] 
    
    
        # Versuch Nr2. klappt leider auch nicht
        # meine-website ist hier nur ein Platzhalter
        # 
        # Von ohne www auf mit www umleiten
        # RewriteCond %{HTTP_HOST} ^meine-website\.de [NC]
        # RewriteRule (.*) https://www.meine-website.de/$1 [R=301,L]
    *        # HTTPS aktivieren
        # RewriteCond %{HTTPS} !=on
        # RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R,L]
        # RewriteCond %{REQUEST_FILENAME} !-f
        # RewriteRule ^(.*)$ app.php [QSA,L]
    
    
        # Rewrite all other queries to the front controller.
        RewriteRule ^ %{ENV:BASE}/app.php [L]
    </IfModule>
    
    <IfModule !mod_rewrite.c>
        <IfModule mod_alias.c>
            # When mod_rewrite is not available, we instruct a temporary redirect of
            # the start page to the front controller explicitly so that the website
            # and the generated links can still be used.
            RedirectMatch 302 ^/$ /app.php/
            # RedirectTemp cannot be used instead
        </IfModule>
    </IfModule>
    Hier einmal die durchkommentierte .htaccess

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

    Standard

    Deine Redirects solltest du direkt nach RewriteEngine On geben.

    Hast du schon deine Cookies gelöscht?

  5. #5
    Contao-Nutzer
    Registriert seit
    17.06.2011.
    Beiträge
    52

    Standard

    Code:
    <IfModule mod_headers.c>
        # Allow access from all domains for webfonts (see contao/core-bundle#528)
        <FilesMatch "\.(ttf|ttc|otf|eot|woff2?|font\.css)$">
            Header set Access-Control-Allow-Origin "*"
        </FilesMatch>
    </IfModule>
    
    <IfModule mod_rewrite.c>
        RewriteEngine On
    
    
        # Determine the RewriteBase automatically and set it as environment variable.
        # If you are using Apache aliases to do mass virtual hosting or installed the
        # project in a subdirectory, the base path will be prepended to allow proper
        # resolution of the app.php file and to redirect to the correct URI. It will
        # work in environments without path prefix as well, providing a safe, one-size
        # fits all solution. But as you do not need it in this case, you can comment
        # the following 2 lines to eliminate the overhead.
        RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$
        RewriteRule ^(.*) - [E=BASE:%1]
    
        # Sets the HTTP_AUTHORIZATION header removed by Apache
        RewriteCond %{HTTP:Authorization} .
        RewriteRule ^ - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    
        # Redirect to URI without front controller to prevent duplicate content
        # (with and without `/app.php`). Only do this redirect on the initial
        # rewrite by Apache and not on subsequent cycles. Otherwise we would get an
        # endless redirect loop (request -> rewrite to front controller ->
        # redirect -> request -> ...).
        # So in case you get a "too many redirects" error or you always get redirected
        # to the start page because your Apache does not expose the REDIRECT_STATUS
        # environment variable, you have 2 choices:
        # - disable this feature by commenting the following 2 lines or
        # - use Apache >= 2.3.9 and replace all L flags by END flags and remove the
        #   following RewriteCond (best solution)
        RewriteCond %{ENV:REDIRECT_STATUS} ^$
        RewriteRule ^app\.php(?:/(.*)|$) %{ENV:BASE}/$1 [R=301,L]
    
        # If the requested filename exists, simply serve it.
        # We only want to let Apache serve files and not directories.
        RewriteCond %{REQUEST_FILENAME} -f
        RewriteRule ^ - [L]
    
    
        #RewriteCond %{HTTPS} !=on 
        #RewriteCond %{ENV:HTTPS} !=on 
        #RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L] 
    
        # Rewrite all other queries to the front controller.
        RewriteRule ^ %{ENV:BASE}/app.php [L]
    </IfModule>
    
    <IfModule !mod_rewrite.c>
        <IfModule mod_alias.c>
            # When mod_rewrite is not available, we instruct a temporary redirect of
            # the start page to the front controller explicitly so that the website
            # and the generated links can still be used.
            RedirectMatch 302 ^/$ /app.php/
            # RedirectTemp cannot be used instead
        </IfModule>
    </IfModule>
    So besser?
    Cookies sind gelöscht ... Login schlägt fehl...

    Irgendwoher kommt eine 303-Weiterleitung ... Woher könnte die stammen?

  6. #6
    Contao-Urgestein Avatar von Samson1964
    Registriert seit
    05.11.2012.
    Ort
    Berlin
    Beiträge
    2.794

    Standard

    Zitat Zitat von limonen-zebra Beitrag anzeigen
    Irgendwoher kommt eine 303-Weiterleitung ... Woher könnte die stammen?
    Das siehst Du ja in den Browsertools (Netzwerk). Wenn der Browser immer noch umleitet, sind die Cookies im Browser noch nicht restlos gelöscht. Gibt es einen Link?
    Viele Grüße
    Frank

    Seit Mai 2013 Fan von Contao
    Webmaster vom Deutschen Schachbund und Berliner Schachverband
    Mein Blog: Schachbulle
    Meine Erweiterungen bei GitHub
    Meine Videos auf YouTube: Playlist zur Contao-Programmierung/Einrichtung

  7. #7
    Contao-Nutzer
    Registriert seit
    17.06.2011.
    Beiträge
    52

    Standard

    PN ist raus - vielen Dank.

    Cookies wurden gelöscht. Es wurde auch von quasi "projektfremden" Rechnern versucht drauf zuzugreifen.
    Wie gesagt, mit Glück kommt man kurz rein, beim nächsten Klick fliegt man raus und landet auf der Login-Maske.

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
  •